Get Prefetch request status - GET /api/prefetch/{prefetch-id}

Parent Previous Next

GET /api/prefetch/{prefetch-id}                            

Get the status of a prefetch request.  The prefetch-id is returned when creating a new prefetch request.  You can get the status of a prefetch up to two weeks after the request.

Request Syntax


Request Headers


Header

Description

Required

Authorization

Authorization string for the request

Yes

Host

URI for the QUANTIL SDK (i.e., api.quantil.com)

Yes

Date

The date and time of the request.

Yes

Accept

Indicates the accepted format (i.e., application/xml)

Yes

Request Body Elements


This request does not include an XML document in the request body.



Request Syntax:


GET /api/prefetch/{prefetch-id} HTTP/1.1

Authorization: <authorization string>

Host: api.quantil.com

Date: <date>

Accept: application/xml


Here is the structure of a request using the curl utility.


curl -i -url https://api.quantil.com/api/prefetch/{prefetch-id}

-X GET

-u {user}: {password}

-H 'Date: Thu, 17 May 2012 19:37:58 GMT'

-H 'Accept: application / xml'



Sample Request:


curl -i --url 'https://api.quantil.com/api/prefetch/3d60a802-b0de-4bf9-946d-cb07fa8b6ea2' -X GET -u username:fZ+hemqgaTF9DkgyBlkQLidctH4= -H 'Date: Thu, 24 Sep 2015 14:03:51 PDT' -H 'Accept: application/xml'

Response Details:


Response Headers:

HTTP / 1.1 202 Accepted

Date: <date>

Content-Type: application / xml; charset = utf-8

x-cnc-request-id: {id string auto generated by the QUANTIL server}


Response Body Elements

Element

Description

prefetch-result

A container which has a <request-date> element and an <items> element describing the URLs that were prefetched.

request-date

RFC1123 format date indicating when the request was made.

items

A container describing a list of URLs that are prefetched. It contains zero or more <item> elements.

item

A container which describes a URL that is prefetched. It includes the following child elements: <path>, <status>, <rate>, and <itemId>

path

A URL being prefetched. The URL should begin with http:// or https://.

status

Indicates the status of the prefetch. It can be success, failure, running, or wait.

rate

Indicates the percentage of servers that have the content.


Sample Response:

HTTP/1.1 200 OK

Date: Thu, 24 Sep 2015 21:03:50 GMT

Accept-Ranges: bytes

Server: WS-web-server

x-cnc-request-id: 14266378

ContentType: application/xml;charset=UTF-8

Content-Type: application/xml;charset=UTF-8

Content-Length: 500


<?xml version="1.0" encoding="UTF-8"?>

<prefetch-result>

<request-date>Fri, 05 Sep 2014 07:58:13 GMT</request-date>

<items>

<item>

<path>http://140619.donotdelete.flowtest.test.com/images/infobg2.gif</path>

<status>success</status>

<rate>100</rate>

</item>

<item>

<path>http://140619.donotdelete.flowtest.test.com/images/float_bg_c.png</path>

<status>failure</status>

<rate>0</rate>

</item>

</items>

</prefetch-result>


Error List


This API has no special error codes.