{"type":"api","title":"Get Job","meta":{"id":"/apps/pubhub/media/edm-api-v2/a2a30bcc9ecab5281b65761ae61df7e0031d5691/f67a4e01-0023-334a-9a4a-7e606c2ef1a2","swagger":"2.0","info":{"contact":{"email":"devmgmt@cisco.com"},"description":"This is the IoT device management core service. The service is responsible for managing the lifecycle of various IoT gateways and endpoints deployed as part of the Field Area Networks","license":{"name":"Licensing is primarily subscription based. Call Andy now!","url":"https://www.cisco.com"},"termsOfService":"http://swagger.io/terms/","title":"IoT Device Lifecycle Management","version":"4.0.0"},"host":"us.ciscoiot.com","basePath":"/nbapi/edm/v1","schemes":["https"],"securityDefinitions":{"bearerAuth":{"description":"This is the bearer Auth token.","in":"header","name":"Authorization","type":"apiKey"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"apiKeyGenerator":{"$remoteModule":"./config/apikey.js"}}},"spec":{"description":"Returns a single job details and log info.\u003cbr /\u003e One of the below permissions is needed to invoke this API\u003cbr /\u003e- Tenant Management\u003cbr /\u003e- Manage Devices","operationId":"getJob","parameters":[{"description":"The uuid of the tenant in whose context we are calling the api.","format":"uuid","in":"header","name":"x-tenant-id","required":true,"type":"string"},{"description":"specific job-ID to search details for","in":"path","name":"job_id","required":true,"type":"string"},{"default":0,"description":"particular page number to return","in":"query","minimum":0,"name":"page","required":false,"type":"integer"},{"default":20,"description":"The numbers of job logs to return","in":"query","maximum":200,"minimum":1,"name":"size","required":false,"type":"integer"},{"description":"order to sorting the retrieved records","in":"query","name":"sort_order","required":false,"type":"string"},{"description":"sort criteria for retrieved records","in":"query","name":"sort_by","required":false,"type":"string"}],"produces":["application/json"],"responses":{"200":{"description":"successful retrieval","schema":{"properties":{"failureCount":{"type":"integer"},"limit":{"description":"Count of items to be returned in a single page (as given in input)","type":"integer"},"logList":{"description":"list of all logs records retrieved for a specific job_id (in paginated order)","items":{"properties":{"logMessage":{"example":"com.cisco.cgms.devicemgmt.DeviceLoader job finished","type":"string"},"updatedAt":{"example":"2020-02-05 01:12","type":"string"}},"type":"object","$$ref":"#/definitions/JobLogItem"},"type":"array"},"name":{"example":"router2.csv","type":"string"},"status":{"type":"string"},"submittedAt":{"example":"2020-02-05 01:12","type":"string"},"successCount":{"type":"integer"},"totalLogCount":{"description":"The total count of devices returned by query","example":1,"format":"int64","type":"integer"},"totalPages":{"description":"Total numbers of pages to display","format":"int64","type":"integer"},"totalRecords":{"type":"integer"},"type":{"example":"Add device","type":"string"},"userName":{"example":"myusername","type":"string"}},"type":"object","$$ref":"#/definitions/JobInfo"}},"400":{"description":"Bad request","schema":{"description":"Specifies the error that occurred during the jobs api request.","example":{"code":39,"message":"Unable to retrieve jobs based on given query: invalid query passed with query params: Type=Add Device Offset=0 PageLimit=20","meta":null},"type":"object","$$ref":"#/definitions/JobError"}},"401":{"description":"Unauthorized","schema":{"example":"Unauthorized","type":"string"}},"403":{"description":"Forbidden","schema":{"example":"Permission denied to access the resouce","type":"string"}},"404":{"description":"Not found","schema":{"description":"Specifies the error that occurred during the jobs api request.","example":{"code":6,"message":"Unable to retrieve jobs based on given query: invalid query passed with query params: Type =Add Device Offset=0 PageLimit=20","meta":null},"type":"object","$$ref":"#/definitions/JobNotFoundError"}}},"summary":"Get job details along with log-messages by job_id","tags":["jobs"],"__originalOperationId":"getJob","security":[{"bearerAuth":[]}],"method":"get","path":"/jobs/{job_id}"}}