Retrieve Resource Request Status

get

/iot/api/v2/requests/{requestId}

This interface should be used for polling the server to check the status of a previously posted asynchronous invocation request.
Once such a request reaches the server it replies without a delay reporting a new request ID. The request status can be:
  • RECEIVED - received by the server, not sent to the endpoint yet
  • DISPATCHED - sent to the endpoint, no response received yet
  • COMPLETED - response received, the output JSON contains the response message received from the ednpoint
  • FAILED - an error occured, the invocation request was not handled

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

Successfully processed
Body ()
Root Schema : ResourceRequestStatusImpl_receive
Type: object
Show Source

400 Response

Bad Request. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

401 Response

Unauthorized. The request requires user authentication.

404 Response

Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
Back to Top

Examples

The following example shows how to get the status of a request with request_Id 330b5e4c447f-588d, by submitting a GET request on the REST resource using cURL. Note that in both the request and response, iotserver will be replaced by the name and port of your assigned IoT cloud server. The format of the Cloud Service instance is myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443. For more information about cURL, see Use cURL.

curl -X GET -k -u username@example.com:welcome1 -H "Accept: application/json" 'https://iotserver/iot/api/v2/requests/330b5e4c447f-588d'

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Content-Type: application/json

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
   "responseEventTime":"2016-07-22T10:44:57.746Z",
   "requestTime":"2016-07-22T10:44:57.746Z",
   "responseStatusCode":"HTTP 200: OK",
   "method":"Request method",
   "response":"Original response message payload JSON document",
   "responseTime":"Time when the response is received by server",
   "endpointId":"16a7421e2f4b-5433",
   "links":[
      {
         "rel":"self",
         "href":"http://iotserver/iot/api/version/resource/path"
      },
      {
         "rel":"canonical",
         "href":"http://iotserver/iot/api/version/resource/path"
      }
   ],
   "id":"330b5e4c447f-588d",
   "complete":false,
   "url":"http://iotserver/iot/api/version/resource/path",
   "status":"RECEIVED"
}
Back to Top