REST API v4: GET data request status

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

https://api.copernica.com/v4/datarequest/$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.

Example:

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

PHP example

// required scripts
require_once('CopernicaRestAPI.php');

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

// get the status of the data request (don't forget the id)
$api->get("datarequest/{$requestID}/status")

This example requires the REST API class.

More information