Documentation API Docs Bandwidth Report QueryBandwidthForMultiDomain

QueryBandwidthForMultiDomain

Update time: 2026-07-13 15:50:14

Applicable Products

universal

API Description

This interface is used to query the domain bandwidth of dynamic acceleration products. Users need to provide time parameters to obtain bandwidth data within the specified time period. The return content includes detailed data for each time slice of bandwidth. This interface helps users fully understand the bandwidth consumption of multiple domain names, thereby optimizing network resources and planning bandwidth.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

JSON
NameDescription
*domainListObject
Domain list.Domain number limits can be adjusted depending on different accounts. The default value is 1000(if you want to adjust,please, contact technical support)
*domainNameList
Domain
*datefromString
Start time 1.The format is yyyy-MM-ddTHH:mm:ss+08:00; 2.And smaller than the current time and dateTo; 3.Period between dataFrom and dateTo cannot be longer than 31 days
*datetoString
End time 1.The format is yyyy-MM-ddTHH:mm:ss+08:00; 2.Must be greater than dateFrom; 3.If it's greater than the current time, then the current time will be assigned as the value
*typeString
Data granularity fiveminutes: five minutes, hourly: one hour, daily: one day;If not specified, daily is set as the default value

Response parameter(s)

Body Params

JSON
NameDescription
bandwidthReportList
timestampString
Date: 1.When the querying data granularity is fiveminutes, the format is yyyy-MM-dd HH:mm; the data value of every time slice represents the data value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 00:05 AM, and the last one is yyyy-MM-dd 24:00; 2.When the querying data granularity is hourly, the format is yyyy-MM-dd HH; the data value of every time slice represents the data value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 01, and the last one is yyyy-MM-dd 24; 3.When the querying data granularity is daily, the format is yyyy-MM-dd; the data value of every time slice represents the value of the daily data; 4.Return the time slice contained in start time and in end time
bandwidthInteger
Bandwidth, keep the number to four decimal places. Unit: Mbps

Error code

Error code(code)Description(message)HTTP statusSemantic
DomainNameIsRequiredRequest body is specified and domain array is empty400Request body is specified and domain array is empty
NoSuchDomainDomain does not exist, or does not belong to the current account that calls the interface404Domain does not exist, or does not belong to the current account that calls the interface
InvalidChannelDomain is illegal403Domain is illegal
InvalidDatePerioddatefrom of dateto does not conform to the specification.400datefrom of dateto does not conform to the specification.
DateSpanErrordatefrom and dateto should not be more than 31 days apart.400datefrom and dateto should not be more than 31 days apart.
InvalidReportTypeParameter type does not conform to the specification.400Parameter type does not conform to the specification.
DomainsExcessiveThe number of domains passed exceeds the account limit.403The number of domains passed exceeds the account limit.
ReportErrorSystem error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted)400System error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted)
InternalErrorSystem error503System error

Example

XML
JSON
XML
Request example
Copy Copy success
#!/bin/bash
# Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response
username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.atomile.com/api/report/domainbandwidth/dwa?datefrom=2017-11-07T00:00:00%2B00:00&dateto=2017-11-07T00:10:00%2B00:00&type=fiveminutes" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-d '<?xml version="1.0" encoding="utf-8"?>
<domain-list>
  <domain-name>www.exapmle1.com</domain-name>
  <domain-name>www.exapmle2.com</domain-name>
</domain-list>'
Response example
Copy Copy success
<?xml   version="1.0" encoding="utf-8"?>
  <bandwidth-report>
    <bandwidth-data>
      <timestamp>2017-11-07   00:05:00</timestamp>
        <bandwidth>12217.2046</bandwidth>
    </bandwidth-data>
    <bandwidth-data>
      <timestamp>2017-11-07   00:10:00</timestamp>
        <bandwidth>14424.9125</bandwidth>
    </bandwidth-data>
  </bandwidth-report>