Hits by Countries Report - GET /api/report/hit/countries

Reports ››
Parent Previous Next

GET /api/report/hit/countries            

Get the hits or requests for all your domains from different countries.   Request parameters allow you to specify a time period, and optionally, whether you want to know hits for HTTPS traffic only or HTTP traffic only.



Request Details


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 Parameters

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

https

If true, return hits for domains using SSL. If false, return hits for domains not using SSL. If not specified, return all traffic (SSL and non-SSL).

No


Request Body Elements

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


Request Syntax:


GET /api/report/hit/countries 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/countries ?datefrom = {date from} & dateto = {date to} & type = {fiveminutes or Hourly or daily} & https = {https setting}

-X GET

-u {user}: {password}

-H 'Date: Fri, 26 Oct 2012 06:33:26 GMT'

-H 'Accept: application/xml'

Sample Request:


curl -i --url 'https://api.quantil.com/api/report/hit/countries?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-02T23:59:59%2B09:00&type=fiveminutes' -u test:pDz9BXnyZtq7jyVQZjBls0OBZk4= -H 'Date: Thu, 07 Aug 2014 14:31:12 PDT' -H 'Accept: application/xml'

Response Details:


Response Headers:

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}



Response Body Elements


Element

Description

hit-report

container for request (hit) information. It will contain zero or more hit-country objects giving the number of hits from each country.

hit-country

container object which contains a <country> element and a <hit> element.

country

a country string (i.e., Canada) indicating the location of the visitor.

hit

indicates number of hits or requests for objects

Sample Response:


The following example shows data at five minute intervals.



HTTP/1.1 200 OK

Date: Thu, 07 Aug 2014 22:36:22 GMT

Accept-Ranges: bytes

Server: WS-web-server

x-cnc-request-id: 1130184

ContentType: application/xml;charset=UTF-8

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

Content-Length: 2161


<hit-report>

 <hit-country>

   <country>Hong Kong</country>

   <hit>54848</hit>

 </hit-country>

 <hit-country>

   <country>Taiwan</country>

   <hit>143460</hit>

 </hit-country>

 <hit-country>

   <country>Greece</country>

   <hit>72110</hit>

 </hit-country>

 <hit-country>

   <country>Spain</country>

   <hit>91274</hit>

 </hit-country>

 <hit-country>

   <country>Italy</country>

   <hit>114876</hit>

 </hit-country>

 <hit-country>

   <country>Switzerland</country>

   <hit>132777</hit>

 </hit-country>

 <hit-country>

   <country>Great Britain</country>

   <hit>140586</hit>

 </hit-country>

 <hit-country>

   <country>India</country>

   <hit>103450</hit>

 </hit-country>

 <hit-country>

   <country>France</country>

   <hit>95779</hit>

 </hit-country>

 <hit-country>

   <country>Malaysia</country>

   <hit>77119</hit>

 </hit-country>

 <hit-country>

   <country>South Africa</country>

   <hit>86565</hit>

 </hit-country>

 <hit-country>

   <country>China</country>

   <hit>158731</hit>

 </hit-country>

 <hit-country>

   <country>Finland</country>

   <hit>82507</hit>

 </hit-country>

 <hit-country>

   <country>Turkey</country>

   <hit>99618</hit>

 </hit-country>

 <hit-country>

   <country>Korea</country>

   <hit>113317</hit>

 </hit-country>

 <hit-country>

   <country>USA</country>

   <hit>100692</hit>

 </hit-country>

 <hit-country>

   <country>Mexico</country>

   <hit>169249</hit>

 </hit-country>

 <hit-country>

   <country>Canada</country>

   <hit>133943</hit>

 </hit-country>

 <hit-country>

   <country>Poland</country>

   <hit>113560</hit>

 </hit-country>

 <hit-country>

   <country>Brazil</country>

   <hit>102045</hit>

 </hit-country>

 <hit-country>

   <country>Singapore</country>

   <hit>123874</hit>

 </hit-country>

 <hit-country>

   <country>Russia</country>

   <hit>136101</hit>

 </hit-country>

 <hit-country>

   <country>Germany</country>

   <hit>80402</hit>

 </hit-country>

 <hit-country>

   <country>Norway</country>

   <hit>110441</hit>

 </hit-country>

 <hit-country>

   <country>Japan</country>

   <hit>140063</hit>

 </hit-country>

</hit-report>


Error List


Error

Description

HTTP status code

InvalidDatePeriod

The date specified is invalid.

400

InvalidReportType

The report type specified is invalid.

400