{"type":"api","title":"Create an Organization Catalog Script","meta":{"id":"/apps/pubhub/media/orbital-api/1c9ae58c5602552df6194a1545023fdb0c609c3b/6031b5a0-67fa-3480-bf75-857e24b55963","info":{"description":"Documentation of the Orbital API\n\nTo authenticate:\n\n\nFollow steps 1 through 3 from the SecureX Authorization section of this article to generate a SecureX Token.\nhttps://developer.cisco.com/docs/secure-endpoint/#!authentication\n\n\nclick \"Authorize\" button\nIn \"Value\" - enter token from above, prefixed with \"Bearer \" (no quotes)\nClick \"Authorize\", followed by \"Close\"\n\nNow the \"Try it out\" button can work","title":"Orbital API","version":"0.0.1"},"security":[{"AuthorizationHeader":[]}],"openapi":"3.0.3","servers":[{"description":"North America","url":"https://enterprise.orbital.amp.cisco.com/v0"},{"description":"Asia, Pacific, Japan, and China","url":"https://apjc.orbital.amp.cisco.com/v0"},{"description":"Europe","url":"https://eu.orbital.amp.cisco.com/v0"}],"securitySchemes":{"AuthorizationHeader":{"description":"Ex: Bearer \\\u003ctoken\\\u003e","in":"header","name":"authorization","type":"apiKey"}}},"spec":{"description":"Create an Organization Catalog Script","operationId":"idOfCatalogScriptCreate","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"catalog script description","example":"script to terminate procs","type":"string"},"id":{"description":"orbital id of the catalog script","example":"123","type":"string"},"platform":{"description":"platform list, can be any of darwin, macos, windows, linux, posix","example":["darwin","windows"],"items":{"type":"string"},"type":"array"},"script":{"description":"Scripts allows us to marshal a []Script to PostgresQL","properties":{"args":{"description":"script arguments","items":{"properties":{"ArgType":{"example":"ORBITAL_BASIC_STRING","type":"string"},"description":{"description":"description of the parameter","example":"age of the person","type":"string"},"name":{"description":"name of the parameter","example":"age","type":"string"},"optional":{"example":true,"type":"boolean"},"value":{"description":"value of the parameter","example":"23","type":"string"}},"required":["name","value"],"type":"object","$$ref":"#/components/schemas/CatalogScriptArgs"},"type":"array"},"content":{"description":"script content encoded in base64","example":"aW1wb3J0IHN5cwoKZGVmIHByaW50SG9iYmllcyg","type":"string"},"label":{"description":"user labels","type":"string"},"name":{"description":"script name","example":"terminate procs","type":"string"},"timeout":{"description":"how long until the script execution is considered timed-out, in seconds","example":600,"format":"int32","type":"integer"}},"type":"object","$$ref":"#/components/schemas/CatalogScript"},"title":{"description":"catalog script title","example":"terminate processes","type":"string"},"version":{"description":"version of the script","example":"1","type":"string"}},"required":["platform"],"type":"object","$$ref":"#/components/schemas/CatalogScriptRequest"}}},"description":"Parameter required to create or update catalog script record","x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"Scripts allows us to marshal a []Script to PostgresQL","properties":{"ID":{"description":"catalog ID","example":"123","type":"string"},"config":{"$ref":"#/components/schemas/ScriptConfig"},"created":{"description":"catalog script creation timestamp","example":"2023-08-23T18:10:44.732Z","format":"date-time","type":"string"},"creator":{"description":"catalog script creator","example":"user123","type":"string"},"disabled":{"description":"Is the script disabled","example":false,"type":"boolean"},"organization":{"description":"organization","example":"11111111-1111-1111-1111-111111111111","type":"string"},"title":{"description":"catalog script title","example":"script to terminate procs","type":"string"},"updated":{"description":"catalog script updation timestamp","example":"2023-08-23T18:10:44.732Z","format":"date-time","type":"string"}},"type":"object","$$ref":"#/components/schemas/Script"},"errors":{"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/CatalogScriptResponse"}}},"description":"catalog script.","$$ref":"#/components/responses/CatalogScriptResponse"},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"example":["script content should not exceed 65536 bytes"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/ErrorMsg400CatalogScriptPostLarge"}}},"description":"Catalog Script Error 400 POST Response","$$ref":"#/components/responses/ErrorMsg400CatalogScriptPost"},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"example":["authentication required"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/ErrorMsg401MissingToken"}}},"description":"Script Error 401 Response","$$ref":"#/components/responses/ErrorMsg401"},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"example":["access to this feature is not permitted"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/ErrorMsg403Forbidden"}}},"description":"Script Error 403 Response","$$ref":"#/components/responses/ErrorMsg403Forbid"}},"security":[{"AuthorizationHeader":[]}],"summary":"Create an Organization Catalog Script","tags":["Scripts"],"__originalOperationId":"idOfCatalogScriptCreate","method":"post","path":"/catalogs/scripts"}}