Domain Traffic Volume by Client ISPs Report - GET /api/report/{domain-id}/flow/clientisp

Reports ››
Parent Previous Next

GET /api/report/{domain-id}/flow/clientisp          

Get the traffic volume in megabytes or as percentages of a specific domain or domains grouped by client internet service providers (ISPs).   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 whether to get percentages.

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 volume from each ISP or logvalue to get the actual bytes for each ISP.

Yes


Request Body Elements

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


Request Syntax:


GET /api/report/{domain-id}/flow/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/{domain-ID}/flow/clientisp?datefrom = {date from} & dateto = {date to} & type={percent or log value}

-X GET

-u {user}: {password}

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

-H 'Accept: application/xml'

Sample Request:


This request will obtains the breakdown of volume by client ISP returned as percentages.


curl -i --url 'https://api.quantil.com/api/report/123/flow/clientisp?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-02T23:59:59%2B09:00&type=percent' -u test:aDz9BXnyittq7jyVQZjBls0OBZk4= -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

flow-report

container for traffic information. It will contain zero or more <flow-client-isp> child elements indicating volume for different ISPs.

flow-client-isp

a container which has one <client-isp> element and either a <percent> element or a <value> element.  The <percent> element is returned if the query parameter type is percent while <value> is returned if type is logvalue.

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.

percent

indicates percentage of traffic from the ISP.

value

indicates bytes transferred.

Sample Response:


HTTP/1.1 200 OK

Date: Thu, 07 Aug 2014 23:16:32 GMT

Accept-Ranges: bytes

Server: WS-web-server

x-cnc-request-id: 1130615

ContentType: application/xml;charset=UTF-8

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

Content-Length: 727


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

<flow-report>

<flow-client-isp><client-isp>CN_dianxin</client-isp><percent>53.74</percent></flow-client-isp>

<flow-client-isp><client-isp>CN_wangtong</client-isp><percent>19.46</percent></flow-client-isp>

<flow-client-isp><client-isp>CN_yidong</client-isp><percent>14.98</percent></flow-client-isp>

<flow-client-isp><client-isp>FR_Orange</client-isp><percent>3.25</percent></flow-client-isp>

<flow-client-isp><client-isp>RU_Golden</client-isp><percent>1.21</percent></flow-client-isp>

<flow-client-isp><client-isp>US_T-Mobile</client-isp><percent>5.14</percent></flow-client-isp>

<flow-client-isp><client-isp>Other ISPs</client-isp><percent>2.18</percent></flow-client-isp></flow-report>




Error List


Error

Description

HTTP status code

InvalidDatePeriod

The date specified is invalid.

400

InvalidReportType

The report type specified is invalid.

400

NoSuchDomain

The specified domain does not exist.

404