Get the most popular files requested from your 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 results by either traffic volume or number of requests for objects. Up to 100 files 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}/popularfiles 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} /popularfiles ?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/popularfiles?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 |
popularfiles-report |
container for popular files information. It will contain zero or more <file> child elements describing the files. |
file |
indicates the traffic volume and requests for a file. It contains one <url>, one <flow>, and one <hit> element. |
url |
Url of the file that was requested. |
flow |
traffic volume in bytes for the file |
hit |
number of requests for the file |
HTTP/1.1 200 OK
Date: Fri, 08 Aug 2014 21:32:36 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 1148053
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 905
<popularfiles>
<file>
<url>http://mydomain.com/91.htm</url>
<flow>871052</flow>
<hit>9987</hit>
</file>
<file>
<url>http://mydomain.com/35.htm</url>
<flow>383902</flow>
<hit>9979</hit>
</file>
<file>
<url>http://mydomain.com/18.htm</url>
<flow>891705</flow>
<hit>9846</hit>
</file>
<file>
<url>http://mydomain.com/36.htm</url>
<flow>587347</flow>
<hit>9548</hit>
</file>
<file>
<url>http://mydomain.com/97.htm</url>
<flow>580418</flow>
<hit>9257</hit>
</file>
<file>
<url>http://mydomain.com/11.htm</url>
<flow>831631</flow>
<hit>9162</hit>
</file>
</popularfiles>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
NoSuchDomain |
The specified domain does not exist. |
404 |