Live Stream Acceleration Domain Traffic Volume by Region Report - GET /api/report/{domain-id}/flow/{region}

Parent Previous Next

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

Get the traffic volume in megabytes for a specific Live Stream Acceleration domain or domains by acceleration region.  Domain-id is a unique ID representing a domain. QUANTIL Support can provide you the IDs of your domains. Specify multiple domains by entering their IDs separated only by commas.  The region can be 'cn' representing 'Mainland China', 'nc' representing 'Near China', 'euna' representing 'Europe and North America' , 'apac' representing 'Asia Pacific', 'am' representing North and South America, or 'emea' representing  'Europe, Middle East, and Africa'.  You may specify more than one area by separating them with semicolons. In addition, request parameters allow you to specify a time period, an interval type, and timezone for the output.


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

Indicates the granularity of time. It can be oneminute, fiveminutes, hourly, daily, or monthly.

Yes

timezone

Indicates the timezone for the report data. 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


Request Body Elements

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


Request Syntax:


GET /api/report/{domain-id}/flow/{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/ {domain-ID} /flow/{region} ?datefrom = {date from} & dateto = {date to} & type = {fiveminutes or Hourly or daily} & timezone = {timezone}

-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/3487/flow/cn?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-02T23:59:59%2B09:00&type=fiveminutes' -u test:amn9BXnyZtq7jyVQZjBls0OBZk4= -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 one <flow-summary> child element and zero or more <flow-data> child elements indicating volume at different times.

flow-summary

indicates total volume in megabytes

flow-data

this container object contains a <timestamp> element and a <flow> element describing the traffic volume (in megabytes) at a particular time.

timestamp

indicates the date and time

flow

indicates traffic volume in megabytes

Sample Response:


The following example shows data at daily intervals.


HTTP/1.1 200 OK

Date: Fri, 08 Aug 2014 00:52:00 GMT

Accept-Ranges: bytes

Server: Restlet-Framework/2.1.0

x-cnc-request-id: 26381

ContentType: application/xml;charset=UTF-8

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

Content-Length: 599


<flow-report>

 <flow-summary>15.62</flow-summary>

 <flow-data>

   <timestamp>2014-07-31</timestamp>

   <flow>0.56</flow>

 </flow-data>

 <flow-data>

   <timestamp>2014-08-01</timestamp>

   <flow>3.67</flow>

 </flow-data>

 <flow-data>

   <timestamp>2014-08-02</timestamp>

   <flow>4.56</flow>

 </flow-data>

 <flow-data>

   <timestamp>2014-08-03</timestamp>

   <flow>0.63</flow>

 </flow-data>

 <flow-data>

   <timestamp>2014-08-04</timestamp>

   <flow>1.13</flow>

 </flow-data>

 <flow-data>

   <timestamp>2014-08-05</timestamp>

   <flow>5.07</flow>

 </flow-data>

</flow-report>


Error List


Error

Description

HTTP status code

InvalidDatePeriod

The date specified is invalid.

400

InvalidReportType

The report type specified is invalid.

400

InvalidServiceArea

The specified region is invalid.

400

NoSuchDomain

The specified domain does not exist.

404