Get the top visiting IP addresses to a domain or domains. Domain-id is a unique id representing a domain. It is returned when you create a domain. Specify multiple domains by entering their IDs separated only by commas. Request parameters allow you to specify a time period and order visitors by either traffic volume or number of requests for objects. Up to 100 visitor IPs are returned.
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 |
orderby |
This value orders results. Specify flow to order by traffic volume OR hit to order by number of requests. |
Yes |
This request does not include an XML document in the request body.
GET /api/report/{domain-id}/visitors/top 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/ {domain-ID} /visitors/top ?datefrom = {date from} & dateto = {date to} & orderby={flow or hit}
-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/3487/visitors/top?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-05T23:59:59%2B09:00&orderby=hit' -u test:IltUPtb1nMmbHUyNruhjFDBkPvs= -H 'Date: Fri, 08 Aug 2014 14:10:38 PDT' -H 'Accept: application/xml'
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 |
visitor-report |
container for visitor information. It will contain zero or more <top-visitor> child elements describing the visitors. |
top-visitor |
indicates the traffic volume and requests for objects for a visitor. It contains one <visitor> element, one <flow> element, and one <hit> element. |
visitor |
IP address of the visitor |
flow |
traffic volume in bytes for the visitor |
hit |
number of requests for objects in the domain. |
HTTP/1.1 200 OK
Date: Fri, 08 Aug 2014 21:10:38 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 1147904
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 1000
<visitor-report>
<top-visitor>
<visitor>205.164.99.174</visitor>
<flow>65490311</flow>
<hit>99977</hit>
</top-visitor>
<top-visitor>
<visitor>138.6.213.225</visitor>
<flow>71627045</flow>
<hit>99911</hit>
</top-visitor>
<top-visitor>
<visitor>234.224.252.51</visitor>
<flow>62420825</flow>
<hit>99909</hit>
</top-visitor>
<top-visitor>
<visitor>114.73.47.15</visitor>
<flow>97021666</flow>
<hit>99809</hit>
</top-visitor>
<top-visitor>
<visitor>216.244.109.210</visitor>
<flow>38885565</flow>
<hit>99696</hit>
</top-visitor>
<top-visitor>
<visitor>187.250.86.195</visitor>
<flow>86966367</flow>
<hit>99533</hit>
</top-visitor>
<top-visitor>
<visitor>62.32.19.122</visitor>
<flow>25221579</flow>
<hit>99446</hit>
</top-visitor>
</visitor-report>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
NoSuchDomain |
The specified domain does not exist. |
404 |