Hits by Client ISPs Report - GET /api/report/hit/clientisp

Reports ››
Parent Previous Next

GET /api/report/hit/clientisp      

Get the hits or requests for all your domains grouped by client internet service providers (ISPs). Request parameters allow you to specify a time period, whether to get percentages or number of hits, and whether to get 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

type

Can be either percent to get the percentage of hits from each ISP or logvalue to get the actual hits for each ISP.

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/clientisp 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/clientisp ?datefrom = {date from} & dateto = {date to} & type = {percent or logvalue} & 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/clientisp?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-02T23:59:59%2B09:00&type=logvalue' -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-client-isp objects giving the number of hits from each client ISP.

hit-client-isp

container object which contains a <client-isp> element and either a <value> or <percent> element

client-isp

indicates a client ISP. The format includes a two character country code from the list of codes below along with the name of an ISP, for example, FR_Orange.

value

indicates the number of hits or requests for objects

percent

indicates the percentage of hits or requests for a particular ISP

Sample Response:


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: 620


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

<hit-report>

<hit-client-isp><client-isp>CN_dianxin</client-isp><value>2370125021</value></hit-client-isp>

<hit-client-isp><client-isp>CN_wangtong</client-isp><value>855567386</value></hit-client-isp>

<hit-client-isp><client-isp>FR_Orange</client-isp><value>13365868</value></hit-client-isp>

<hit-client-isp><client-isp>RU_Golden</client-isp><value>12092974</value></hit-client-isp>

<hit-client-isp><client-isp>US_T-Mobile</client-isp><value>6488294</value></hit-client-isp>

<hit-client-isp><client-isp>Other ISPs</client-isp><value>58499839</value></hit-client-isp>

</hit-report>


Error List


Error

Description

HTTP status code

InvalidDatePeriod

The date specified is invalid.

400

InvalidReportType

The report type specified is invalid.

400