{"type":"api","title":"Fetch Script Job Results","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":"Fetch Script Job Results","operationId":"idOfScriptResults","parameters":[{"description":"Job ID","in":"path","name":"jobid","required":true,"schema":{"type":"string"}},{"description":"returned in the 'next' field of response to get the next page","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"number of results to return in this request","in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"disabled":{"example":false,"type":"boolean"},"id":{"example":"123","type":"string"},"is_active":{"example":false,"type":"boolean"},"name":{"example":"sample script job","type":"string"},"next":{"example":"next_cursor_id","type":"string"},"organization":{"example":"11111111-1111-1111-1111-111111111111","type":"string"},"results":{"description":"the paged results for the script run","items":{"properties":{"endpoint_organization":{"example":"22222222-2222-2222-2222-222222222222","type":"string"},"error":{"type":"string"},"hostinfo":{"description":"Type HostInfo provides information about the host","properties":{"anyconnectudid":{"example":"28e2c49a-40fb-11ee-be56-0242ac120002","type":"string"},"errors":{"items":{"type":"string"},"type":"array"},"external":{"description":"Type Interface provides information about a network interface","properties":{"active":{"example":true,"type":"boolean"},"ipv4":{"example":"192.168.0.1","type":"string"},"ipv6":{"example":"::1","type":"string"},"mac":{"example":"00-B0-D0-63-C2-26","type":"string"},"name":{"example":"en0","type":"string"}},"type":"object","$$ref":"#/components/schemas/Interface"},"fqdn":{"additionalProperties":{"type":"string"},"example":{"192.168.0.1":"host.example.com"},"type":"object"},"hostname":{"example":"host","type":"string"},"interfaces":{"additionalProperties":{"description":"Type Interface provides information about a network interface","properties":{"active":{"example":true,"type":"boolean"},"ipv4":{"example":"192.168.0.1","type":"string"},"ipv6":{"example":"::1","type":"string"},"mac":{"example":"00-B0-D0-63-C2-26","type":"string"},"name":{"example":"en0","type":"string"}},"type":"object","$$ref":"#/components/schemas/Interface"},"type":"object"},"machine":{"example":"194ec9f2-40fb-11ee-be56-0242ac120002","type":"string"},"osinfo":{"description":"Type OSInfo provides information about the host operating system","properties":{"arch":{"example":"amd64","type":"string"},"os":{"example":"windows","type":"string"},"osname":{"example":"Windows 10 Pro","type":"string"},"release":{"example":"22H2","type":"string"},"version":{"example":"10.0.19045.3324","type":"string"}},"type":"object","$$ref":"#/components/schemas/OSInfo"},"osqueryversion":{"example":"5.8.2","type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"example":"1.31","type":"string"}},"type":"object","$$ref":"#/components/schemas/HostInfo"},"node":{"example":"node_id","type":"string"},"reported":{"description":"the time the run was reported to orbital","format":"date-time","type":"string"},"script_output":{"properties":{"exit_code":{"example":0,"format":"int64","type":"integer"},"stderr":{"type":"string"},"stdout":{"example":"run successful.","type":"string"}},"type":"object","$$ref":"#/components/schemas/ScriptOutput"}},"type":"object","$$ref":"#/components/schemas/ScriptNodeResult"},"type":"array"},"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"},"submitted":{"description":"the time the result was submitted to orbital","format":"date-time","type":"string"}},"type":"object","$$ref":"#/components/schemas/ScriptResult"}}},"description":"Script Job Results.","$$ref":"#/components/responses/ScriptJobResults"},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"example":["could not fetch script from db"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/ErrorMsg400ScriptJobGetResult"}}},"description":"Script Job Error 400 GetResult Response","$$ref":"#/components/responses/ErrorMsg400ScriptJobGetResult"},"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"}},"summary":"Fetch Script Job Results","tags":["Scripts"],"__originalOperationId":"idOfScriptResults","security":[{"AuthorizationHeader":[]}],"method":"get","path":"/script/{jobid}/results"}}