Get the hits or requests to your origin servers. Request parameters allow you to specify a time period, an interval type, and timezone for the output. An optional parameter lets you get hits for HTTPS traffic only or -HTTP traffic only.
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 |
Parameter |
Description |
Required |
datefrom |
RFC3339 formatted date indicating the starting date . Example: 2013-01-01T22:30:00+08:00 |
Yes |
dateto |
RFC3339 formatted date indicating the ending date . Example: 2013-01-01T22:30:00+08:00 |
Yes |
type |
Indicates the granularity of time. Can be fiveminutes, hourly, or daily. |
Yes |
timezone |
Indicates the timezone for the report data. It must be relative to GMT and specified in the format GMT+n where -12<= n <= 12. For example, timezone=GMT-7 and timezone=GMT+8. If the parameter is unspecified, results will be in the GMT timezone. |
No |
https |
If true, return hits for domains using SSL. If false, return hits for domains not using SSL. If not specified, return all hits (SSL and non-SSL). |
No |
This request does not include an XML document in the request body.
GET /api/report/hit/origin 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/report/hit/origin?datefrom = {date from} & dateto = {date to} & type = {fiveminutes or hourly or daily} & timezone = {timezone} & https = {https setting}
-X GET
-u {user}: {password}
-H 'Date: Fri, 26 Oct 2012 06:33:26 GMT'
-H 'Accept: application/xml'
curl -i --url 'https://api.quantil.com/api/report/hit/origin?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-02T23:59:59%2B09:00&type=fiveminutes' -u test:Yzdxz8o3lewxwTjHjTWsrIVV96Y= -H 'Date: Thu, 07 Aug 2014 13:46:34 PDT'
HTTP/1.1 200 OK
Date: <date>
Content-Type: application/xml; charset = utf-8
x-cnc-request-id: {id string auto generated by the QUANTIL server}
Element |
Description |
hit-report |
container for request (hit) information. It will contain one <hit-summary> child element and zero or more <hit-data> child elements indicating the number of requests at different times. |
hit-summary |
indicates total number of requests |
hit-data |
this container object contains a timestamp> element and a <hit> element the number of requests for content |
timestamp |
indicates the date and time |
hit |
indicates number of hits or requests for objects |
The following example shows data at five minute intervals.
HTTP/1.1 200 OK
Date: Thu, 07 Aug 2014 22:04:35 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 1129925
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 1200
<hit-report>
<hit-summary>471123</hit-summary>
<hit-data>
<timestamp>2014-07-31 23:00:00</timestamp>
<hit>3309</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:05:00</timestamp>
<hit>51822</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:10:00</timestamp>
<hit>83825</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:15:00</timestamp>
<hit>22587</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:20:00</timestamp>
<hit>93117</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:25:00</timestamp>
<hit>24383</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:30:00</timestamp>
<hit>4947</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:35:00</timestamp>
<hit>18548</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:40:00</timestamp>
<hit>52169</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:45:00</timestamp>
<hit>24944</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:50:00</timestamp>
<hit>27907</hit>
</hit-data>
<hit-data>
<timestamp>2014-07-31 23:55:00</timestamp>
<hit>63565</hit>
</hit-data>
</hit-report>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
InvalidReportType |
The report type specified is invalid. |
400 |