Retrieve Asynchronous Job Result
get
/py-scripts/v1/jobs/{jobId}/result
Retrieves the result of the asynchronous job.
Request
Path Parameters
-
jobId(required):
The id of the asynchronous job
Response
200 Response
Job result.
401 Response
When the user doesn't have privileges to perform the action.
404 Response
Resource not found, when the result is not ready.
500 Response
Problem connecting to Broker, finding the job id or other unexpected error.
Examples
The following example gets the result 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>/result"
Response Body
The response body in JSON format is the following:
HTTP/1.1 200 OK
Date: Thu, 27 Aug 2020 15:16:32 GMT
Content-Type: application/json
Content-Length: 5045
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
The following is a portion of the result.
{"result":
{"versicolor_8":{"SEPAL_LENGTH":{"0":5.7},"SPECIES":{"0":"versicolor"},"COUNT":"0":5}},
"versicolor_7":{"SEPAL_LENGTH":{"0":5.6},"SPECIES":{"0":"versicolor"},"COUNT":"0":2}},
"virginica_20":{"SEPAL_LENGTH":{"0":6.7},"SPECIES":{"0":"virginica"},"COUNT":{"0":1}},...