API documentation

Data Queue

When calling a purge or prefetch request, we monitor whether the sent URL has been accepted and sent to our queue. We are not able to provide you with information on whether the purge or prefetch itself was successful. The data queue method is here to help you go through the purge and prefetch results.

Available methods

List Request
Details Request
List Url

List Request

GET
https://api.cdn77.com/v2.0/data-queue/list-request
Retrieve a list of purge and prefetch requests. You will receive last 1000 requests.

Object in standard response: requests

Parameters

Parameter Example Description
login string* info@domain.com Your login (email) to CDN77 control panel
passwd string* 8vL4BpXbRqgPTKA0h Your API password.
cdn_id int CDN Id. See how to retrieve a list of your CDNs including their Ids.
type string prefetch Type of request. Valid values: 'prefetch' | 'purge'
* Parameter required.

Return Values

Return Value Description
id > Queued request ID. You will retrieve this ID in your purge/prefetch request.
cdn_id > CDN Id. See how to retrieve a list of your CDNs including their Ids.
type > Type of request. Valid values: 'prefetch' | 'purge'
created > Timestamp of creation.
finished > Your request receives a timestamp when it has been finished (successfully or not).
url_successful > Amount of successfully proceeded URL. Until the request is finished, this number may increase in time.
url_total > Total amount of URL in a request.
waiting_for_request_id > When enabling the 'purge_first' option on the prefetch method, the urls are saved into the queue twice - first into the purge and then to the prefetch. To ensure the purge is proceeded first, we add the id of the purge request into the prefetch as value waiting_for_request_id. Valid values: null or int.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/data-queue/list-request?login=name@domain.com&passwd=your_api_password" {"status": "ok", "description": "Request was successful.", "requests": [{"id": 6486, "cdn_id": XXX, "type": "purge", "created": "2014-06-26 14:15:56.293078", "finished": null, "url_successful": 1, "url_total": 3, "waiting_for_request_id": NULL}, {"id": 6485, "cdn_id": XXX, "type": "prefetch", "created": "2014-06-26 14:15:54.974562", "finished": "2014-06-26 14:31:19.403417", "url_successful": 3, "url_total": 3, "waiting_for_request_id": NULL}]}

Details Request

GET
https://api.cdn77.com/v2.0/data-queue/details-request
Get details for a particular request.

Object in standard response: request

Parameters

Parameter Example Description
login string* info@domain.com Your login (email) to CDN77 control panel
passwd string* 8vL4BpXbRqgPTKA0h Your API password.
id int* Queued request ID. You will retrieve this ID in your purge/prefetch request.
* Parameter required.

Return Values

Return Value Description
id > Queued request ID. You will retrieve this ID in your purge/prefetch request.
cdn_id > CDN Id. See how to retrieve a list of your CDNs including their Ids.
type > Type of request. Valid values: 'prefetch' | 'purge'
created > Timestamp of creation.
finished > Your request receives a timestamp when it has been finished (successfully or not).
url_successful > Amount of successfully proceeded URL. Until the request is finished, this number may increase in time.
url_total > Total amount of URL in a request.
waiting_for_request_id > When enabling the 'purge_first' option on the prefetch method, the urls are saved into the queue twice - first into the purge and then to the prefetch. To ensure the purge is proceeded first, we add the id of the purge request into the prefetch as value waiting_for_request_id. Valid values: null or int.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/data-queue/details-request?login=name@domain.com&passwd=your_api_password&id=your_request_id" {"status": "ok", "description": "Request was successful.", "request": {"id": 6364, "cdn_id": XXX, "type": "purge", "created": "2014-06-26 13:22:26.105917", "finished": null, "url_successful": 0, "url_total": 5, "waiting_for_request_id": NULL}}

List Url

GET
https://api.cdn77.com/v2.0/data-queue/list-url
List the URLS for a particular request.

Object in standard response: urls

Parameters

Parameter Example Description
login string* info@domain.com Your login (email) to CDN77 control panel
passwd string* 8vL4BpXbRqgPTKA0h Your API password.
cdn_id int CDN Id. See how to retrieve a list of your CDNs including their Ids.
request_id int Request ID.
* Parameter required.

Return Values

Return Value Description
id > URL ID.
request_id > Request ID.
url > URL.
finished > Until the URL has proceeded value of 'finished’ is NULL. After that the timestamp is shown. Remember that an URL may be marked as finished whether it was proceeded successfully or not.
finished_successfully > Whether the purge or prefetch of a given URL was successful or not.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/data-queue/list-url?login=name@domain.com&passwd=your_api_password&request_id=your_request_id" {"status": "ok", "description": "Request was successful.", "urls": [{"id": XXX, "request_id": XXX, "url": "\/gallery\/01.jpg", "finished": null, "finished_successfully": false}, {"id": XXX, "request_id": XXX, "url": "\/gallery\/02.jpg", "finished": 2014-06-26 08:12:49.373132, "finished_successfully": true}]}