Get bandwidth statistics broken down by each of your domains. Request parameters allow you to specify a time period, an interval type, and timezone for the output. If the time period is unspecified, this API returns the most recent bandwidth statistics available.
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 |
No |
dateto |
RFC3339 formatted date indicating the ending date. Example: 2013-01-01T22:30:00+08:00 |
No |
type |
Indicates the granularity of time. Can be fiveminutes, hourly, or daily. |
No |
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 |
This request does not include an XML document in the request body.
GET /api/report/alldomains/bandwidth 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/alldomains/bandwidth ? ?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'
curl -i --url 'https://api.quantil.com/api/report/alldomains/bandwidth?' -u test:aDz9BRnyZtq7jyVQZjBls0OBZk4= -H 'Date: Thu, 07 Aug 2014 14:31:12 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 |
reports |
This container object will contain zero or more <domain-report> elements which each describe bandwidth use for a domain during a time interval. |
domain-report |
container for a domain's bandwidth information. It will contain one <domain-id> element, a <domain-name> element, and a <bandwidth-data> child element. |
domain-id |
ID of a domain. This value is returned when you create a domain. The corresponding name of the domain is in the <domain-name> element. |
domain-name |
name of the domain whose id is in the <domain-id> element. |
bandwidth-data |
this container object contains a <timestamp> element and a <bandwidth> element describing the average bandwidth for the period. |
timestamp |
indicates the date and time |
bandwidth |
indicates the average bandwidth in Mbits/second for the requested time period. Note that the bandwidth is the same as the traffic volume for the five minute interval multiplied by 8 and divided by 300. |
The following example shows the result of a query which returns the most recent bandwidth statistics for each domain.
Date: Fri, 27 Mar 2015 18:19:04 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 8456733
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 1367
<?xml version="1.0" encoding="UTF-8"?>
<reports>
<domain-report>
<domain-id>12490</domain-id>
<domain-name>my.domain-name.com.us</domain-name>
<bandwidth-data>
<timestamp>2015-03-28 02:15:00</timestamp>
<bandwidth>371.0933</bandwidth>
</bandwidth-data>
</domain-report>
<domain-report>
<domain-id>17386</domain-id>
<domain-name>testdomain.1427199263032.4399.com</domain-name>
<bandwidth-data>
<timestamp>2015-03-28 02:15:00</timestamp>
<bandwidth>1043.1467</bandwidth>
</bandwidth-data>
</domain-report>
<domain-report>
<domain-id>17399</domain-id>
<domain-name>domain_regions.com</domain-name>
<bandwidth-data>
<timestamp>2015-03-28 02:15:00</timestamp>
<bandwidth>201.44</bandwidth>
</bandwidth-data>
</domain-report>
<domain-report>
<domain-id>17400</domain-id>
<domain-name>domain-nametest001.com</domain-name>
<bandwidth-data>
<timestamp>2015-03-28 02:15:00</timestamp>
<bandwidth>959.1733</bandwidth>
</bandwidth-data>
</domain-report>
<domain-report>
<domain-id>17452</domain-id>
<domain-name>testdomain.1427448873909.4399.com</domain-name>
<bandwidth-data>
<timestamp>2015-03-28 02:15:00</timestamp>
<bandwidth>839.1467</bandwidth>
</bandwidth-data>
</domain-report>
</reports>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
InvalidReportType |
The report type specified is invalid. |
400 |