Retrieve Asynchronous Job Result

get

/api/py-scripts/v1/jobs/{jobId}/result

Retrieves the result of the asynchronous job.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

Job result.
Body ()
Root Schema : JSONObject
Type: object
Show Source

401 Response

When the user doesn't have privileges to perform the action.
Body ()
Root Schema : UnauthorizedException
Type: object
Show Source

404 Response

Resource not found, when the result is not ready.
Body ()
Root Schema : AbstractOmlException
Type: object
Show Source

500 Response

Problem connecting to Broker, finding the job id or other unexpected error.
Body ()
Root Schema : ComputeContainerException
Type: object
Show Source
Back to Top

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}},...
Back to Top