GET State Information
Get state information of request
Description
Use a GET method to get information about the state of a request.
The URI of the self field serves as the addressable
resource for the method. Possible states are: READING, IN_QUEUE, PROCESSING, READY, ERROR,
and CANCELLED.
The following sections use JSON as the data serialization format. For an example that shows how to use protobuf as the data serialization format with the Java® client API, see Get the State Information of the Request.
Request
HTTP Method
GET
URI
http://host:port/{request-uri-string}/info
Response
Success
HTTP Status Code
200 OK
Body
| Name | Description | Value-Type |
|---|---|---|
request | URI to current request. | {request-uri-string} |
lastModifiedSeq | Number indicating when the current request was last modified. | {server-state-number} |
state | State of current request. |
Possible states: READING IN_QUEUE PROCESSING READY ERROR CANCELLED |
Example:
{
"request": "/~e4a954fd-5eaf-4b54-aac2-20681b33d075/requests/c5666088-b087-4bae-aa7d-d8470e6e082d",
"lastModifiedSeq": 19,
"state": "READY"
} |
Error
HTTP Status Code
400 NoMatchForQueryParams— Query with
invalid request ID.
404 URL not found
Sample Call
HTTP
Request: GET /~e4a954fd-5eaf-4b54-aac2-20681b33d075/requests/c5666088-b087-4bae-aa7d-d8470e6e082d/info HTTP/1.1 Host: localhost Port: 9910 Response: Status Code: 200 OK
{
"request": "/~e4a954fd-5eaf-4b54-aac2-20681b33d075/requests/c5666088-b087-4bae-aa7d-d8470e6e082d",
"lastModifiedSeq": 19,
"state": "READY"
} |
JavaScript
var data = null;
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "http://localhost:9910/~e4a954fd-5eaf-4b54-aac2-20681b33d075/requests/c5666088-b087-4bae-aa7d-d8470e6e082d/info");
xhr.send(data); |
Version History
Introduced in R2016b