{"type":"api","title":"Schedule Execution of a 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":"Schedule Execution of a Script","operationId":"idOfScheduleScript","requestBody":{"content":{"application/json":{"schema":{"description":"client side script scheduling requests","properties":{"cidr":{"example":"netmask:10.0.0.0/24","type":"string"},"creator":{"example":"creator_name","type":"string"},"expiry":{"description":"unix timestamp for the expiry of this script","example":1697046868,"format":"int64","type":"integer"},"interval":{"description":"script run interval in seconds","example":600,"format":"uint64","minimum":300,"type":"integer"},"name":{"example":"sample script name","maxLength":65536,"minLength":1,"type":"string"},"nodes":{"items":{"type":"string"},"type":"array","$$ref":"#/components/schemas/Nodes"},"nodeversions":{"description":"Versions allows us to marshal a []string to PostgresQL","items":{"type":"string"},"type":"array","$$ref":"#/components/schemas/Versions"},"os":{"items":{"type":"string"},"type":"array","$$ref":"#/components/schemas/OSArray"},"postbacks":{"items":{"description":"Postback represents the wire format of a query.Postback.\nNOTE: the String() method below will be triggered if you\nattempt to create a Value() method to emit this type as JSON\nfor sqlx. So, just use json.Marshal.","properties":{"accessKey":{"type":"string"},"bucket":{"type":"string"},"fingerprint":{"type":"string"},"format":{"type":"string"},"region":{"type":"string"},"requirerows":{"type":"boolean"},"secretKey":{"type":"string"},"token":{"type":"string"},"url":{"type":"string"},"webhookid":{"type":"string"}},"title":"Postback","type":"object","$$ref":"#/components/schemas/Postback"},"type":"array","$$ref":"#/components/schemas/Postbacks"},"script":{"properties":{"args":{"description":"script arguments","items":{"properties":{"ArgType":{"example":"ORBITAL_BASIC_STRING","type":"string"},"Description":{"example":"name of the person","type":"string"},"Name":{"example":"age","type":"string"},"Optional":{"example":false,"type":"boolean"},"Value":{"example":"23","type":"string"}},"required":["Name","Value"],"type":"object","$$ref":"#/components/schemas/ScriptArgs"},"type":"array"},"catalog_id":{"description":"Catalog id of pre-defined stock script, needed if Content is not defined","example":"org:Yahednsxacd","maxLength":65536,"minLength":1,"type":"string"},"content":{"description":"Script content encoded in base64","example":"cHJpbnQoImhlbGxvIHt7IC5maXJzdF9uYW1lIH19Iik=","maxLength":65536,"minLength":1,"type":"string"},"label":{"description":"user labels","type":"string"},"name":{"description":"script name","example":"hello world script","maxLength":65536,"minLength":1,"type":"string"},"timeout":{"description":"Script timeout in seconds","example":600,"format":"int32","type":"integer"}},"type":"object","$$ref":"#/components/schemas/ScriptInput"}},"required":["expiry","nodes","os"],"type":"object","$$ref":"#/components/schemas/ScriptRequest"}}},"description":"Parameter required to schedule script\nMust provide script content or catalog_id but not both","x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ID":{"type":"string"},"done_count":{"format":"int64","type":"integer"},"expiry":{"format":"int64","type":"integer"},"interval":{"format":"int64","type":"integer"},"script_info":{"properties":{"args":{"description":"the arguments that can be passed to the script","items":{"properties":{"argtype":{"example":"ORBITAL_BASIC_STRING","type":"string"},"description":{"example":"name of person","type":"string"},"name":{"example":"name","type":"string"},"value":{"example":"bob","type":"string"}},"type":"object","$$ref":"#/components/schemas/ScriptArg"},"type":"array"},"content":{"example":"cHJpbnQoImhlbGxvIHdvcmxkIik=","type":"string"},"stock":{"example":"stock_id","type":"string"}},"type":"object","$$ref":"#/components/schemas/ScriptInfo"},"submission":{"format":"int64","type":"integer"},"update":{"format":"int64","type":"integer"}},"type":"object","$$ref":"#/components/schemas/ScriptResponse"}}},"description":"Script Job.","$$ref":"#/components/responses/ScriptResponse"},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"example":["bad stock id"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/ErrorMsg400ScheduleScriptPost"}}},"description":"Schedule Script Error 400 Post Response","$$ref":"#/components/responses/ErrorMsg400ScheduleScriptPost"},"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":["authentication invalid"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/ErrorMsg403AuthInvalid"}}},"description":"Script Error 403 Response","$$ref":"#/components/responses/ErrorMsg403"}},"security":[{"AuthorizationHeader":[]}],"summary":"Schedule Execution of a Script","tags":["Scripts"],"__originalOperationId":"idOfScheduleScript","method":"post","path":"/script"}}