Retrieve Asynchronous Job Result

get

/r-scripts/v1/jobs/{jobId}/result

Retrieves the result of the asynchronous job.

Request

Path Parameters
Back to Top

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.
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/r-scripts/v1/jobs/<job id>/result"

Response Body

The response body in JSON format is the following:

HTTP/1.1 200 OK
Date: Thu, 28 Jul 2022 21:04:18 GMT
Content-Type: application/json
Content-Length: 1820
Connection: keep-alive
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1;mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
Content-Security-Policy: frame-ancestors 'none'

The following is a portion of the result.

{"result":[{"Petal.Width":50,"Sepal.Length":50,"Sepal.Width":50,"Species":"setosa","Petal.Length":50,"Species.1":50},{"Petal.Width":50,"Sepal.Length":50,"Sepal.Width":50,"Species":"versicolor","Petal.Length":50,"Species.1":50},{"Petal.Width":50,"Sepal.Length":50,"Sepal.Width":50,"Species":"virginica","Petal.Length":50,"Species.1":50}]}
Back to Top