universal
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.
Single user trigger frequency: 300/5min
| Name | Description |
|---|---|
*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 |
| Name | Description |
|---|---|
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(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| DomainNameIsRequired | Request body is specified and domain array is empty | 400 | Request body is specified and domain array is empty |
| NoSuchDomain | Domain does not exist, or does not belong to the current account that calls the interface | 404 | Domain does not exist, or does not belong to the current account that calls the interface |
| InvalidChannel | Domain is illegal | 403 | Domain is illegal |
| InvalidDatePeriod | datefrom of dateto does not conform to the specification. | 400 | datefrom of dateto does not conform to the specification. |
| DateSpanError | datefrom and dateto should not be more than 31 days apart. | 400 | datefrom and dateto should not be more than 31 days apart. |
| InvalidReportType | Parameter type does not conform to the specification. | 400 | Parameter type does not conform to the specification. |
| DomainsExcessive | The number of domains passed exceeds the account limit. | 403 | The number of domains passed exceeds the account limit. |
| ReportError | System error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted) | 400 | System error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted) |
| InternalError | System error | 503 | System error |
#!/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>'
<?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>