REST API: GET data request status

Warning: You are viewing the documentation for the old REST API. We recommend using version 2 of the REST API.

You can get the status of your data request by sending an HTTP GET request to the following URL:$id/status

where $id is the request identifier of interest.

Return value

A JSON with some information about the status of your data request: This json always has the member status, which have can the values: "available", "pending", or "not available". When the status is "available", you can download the data. When it is "pending", we are still searching for extra data. When it is "not available" we do not have any information. It may be that you have entered a wrong request identifier. The JSON may have a member available, which indicates the number of bytes we have already have added to the requested data. It also may have the member content-type. Currently this is always application/json, but may change in the future.


    "status" : "available"|"pending"|"not available",
    "available" : 1234,
    "content-type" : "application/json"

PHP example

// required scripts

// insert your access token here
$api = new CopernicaRestAPI("your-access-token", 4);

// get the status of the data request (don't forget the id)

This example requires the REST API class.

More information