Retrieve Asynchronous Job Status
get
/api/py-scripts/v1/jobs/{jobId}
Retrieves the status of the asynchronous job.
Request
Path Parameters
-
jobId: string
The id of the asynchronous job
Response
Supported Media Types
- application/json
202 Response
Job is still pending.
302 Response
Returns the Content-Location header where the result of the job can be fetched.
Headers
401 Response
When the user doesn't have privileges to perform the action.
500 Response
Problem connecting to Broker, finding the job id or other unexpected error.
Examples
The following example gets the status of an asynchronous job.
curl -i -X GET --header "Authorization: Bearer ${token}" \
--header 'Accept: application/json' \
"<oml-cloud-service-location-url>/oml/api/py-scripts/v1/jobs/<job id>"
Response Headers
The HTTP response status 302 indicates the job is found and includes a job id for the results.
HTTP/1.1 302 Found
Date: Thu, 27 Aug 2020 15:14:26 GMT
Content-Length: 0
Connection: keep-alive
Cache-Control: no-cache, no-store, private
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1;mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
Content-Location:
<oml_users-cloud-service-location-url>/oml/api/py-scripts/v1/jobs/<job id>/result