Time Range Traffic Volume by Region Report - GET /api/report/rangeflow/{region}

Reports ››
Parent Previous Next

GET /api/report/rangeflow/{region}  

Get the traffic volume in megabytes for all of your domains by acceleration region grouped by whether the traffic occurred within a time range.  The region can be 'cn', 'nc', 'euna', or 'apac' representing Mainland China, near China, Europe/North America, and Asia Pacific, respectively.  You may specify more than one area by separating them with semicolons. Request parameters allow you to specify a time period, time range, and timezone for the range. An optional parameter lets you get 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

rangeStart

Beginning of a time range in HH:MM format indicating the hour and minute of the day.  Example: 17:00 indicates 5pm.

Yes

rangeEnd

End of a time range in HH:MM format indicating the hour and minute of the day.  Example: 17:00 indicates 5pm.

Yes

rangeTz

Timezone for the rangeStart and rangeEnd parameters.  It must be relative to GMT and specified in the format GMT+n where  -12<= n <= 12.  For example, timezone=GMT-7  and timezone=GMT+8.  If the parameter is unspecified, results will be in the GMT timezone

No

https

If true, return traffic for domains using SSL. If false, return traffic 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/rangeflow/{region} 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/rangeflow/{region}?datefrom = {date from} & dateto = {date to} & rangeStart={start time} & rangeEnd={end time}&rangeTz={timezone} & 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/rangeflow/cn?datefrom=2015-04-02T00:00:00%2D08:00&dateto=2015-04-02T17:02:00%2D08:00&rangeStart=19:00&rangeEnd=00:00&rangeTz=GMT' -u test:QK68SwMPRwsnabsKnb4g/0EdlvE= -H 'Date: Tue, 21 Apr 2015 12:22:28 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

reports

container for traffic information. It will contain one <flow-summary> child element, a <flow-in-range> element, and a <flow-out-range> element.

flow-summary

total traffic volume in megabytes in and out of the time range.

flow-in-range

Number of megabytes of traffic that occurred during the time range over the time period.

flow-out-range

Number of megabytes of traffic that occurred outside of the time range over the time period.

Sample Response:


HTTP/1.1 200 OK

Date: Tue, 21 Apr 2015 19:18:47 GMT

Accept-Ranges: bytes

Server: WS-web-server

x-cnc-request-id: 8597984

ContentType: application/xml;charset=UTF-8

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

Content-Length: 146


<reports>

       <flow-summary>9938162.0</flow-summary>

       <flow-in-range>2177950.0</flow-in-range>

       <flow-out-range>7760212.0</flow-out-range>

</reports>


Error List


Error

Description

HTTP status code

InvalidDatePeriod

The date specified is invalid.

400

InvalidTimeRange

The format of rangeStart and rangeEnd should be "hh:mm"

400