Queries bandwidth data by protocol.
Description
- The number of times that each user can call this operation per second is 20.
- If you do not set StartTime or EndTime, data collected within the last 24 hours is queried. If you set both StartTime and EndTime, data collected within the specified time range is queried.
The time granularity supported by the Interval parameter, the maximum time period within which historical data is available, and the data delay vary with the time range to query, as described in the following table.
Time granularity |
Time range to query |
Historical data available |
Data delay |
---|---|---|---|
5 minutes |
3 days |
93 days |
15 minutes |
1 hour |
31 days |
186 days |
4 hours |
1 day |
366 days |
366 days |
04:00 on the next day |
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDomainBpsDataByLayer |
The operation that you want to perform. Set the value to DescribeDomainBpsDataByLayer. |
DomainName | String | No | example.com |
You can specify multiple domain names and separate them with commas (,). You can specify at most 500 domain names in each call. Note If you do not specify an accelerated domain name, the bandwidth data of all the accelerated
domain names that belong to your Alibaba Cloud account is queried.
|
StartTime | String | No | 2020-05-06T07:10:00Z |
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
EndTime | String | No | 2020-05-06T07:20:00Z |
The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note The end time must be later than the start time.
|
Interval | String | No | 300 |
The time interval between the data entries. Unit: seconds. The time granularity varies with the time range to query. Supported values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day). For more information, see Usage notes. |
IspNameEn | String | No | unicom |
The name of the Internet service provider (ISP). You can call the DescribeCdnRegionAndIsp operation to query the most recent ISP list. If you do not specify an ISP, data of all ISPs is queried. |
LocationNameEn | String | No | beijing |
The name of the region. You can call the DescribeCdnRegionAndIsp operation to query the most recent region list. If you do not specify a region, data in all regions is queried. |
Layer | String | No | IPv4 |
The layers at which you want to query the bandwidth data. Valid values:
Default value: all. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
BpsDataInterval | Array of DataModule |
The number of bytes per second collected at each time interval. |
|
DataModule | |||
TimeStamp | String | 2020-05-06T07:10:00Z |
The timestamp of the data returned. |
TrafficValue | String | 2838 |
The total amount of network traffic. Unit: bytes. |
Value | String | 75.68 |
The peak bandwidth value. Unit: bit/s. |
DataInterval | String | 300 |
The time interval between the data entries. Unit: seconds. |
RequestId | String | C565B910-BC3B-467B-9046-2A48566EA967 |
The ID of the request. |
Examples
Sample requests
http(s)://cdn.aliyuncs.com/?Action=DescribeDomainBpsDataByLayer
&DomainName=example.com
&StartTime=2020-05-06T07:10:00Z
&EndTime=2020-05-06T07:20:00Z
&<Common request parameters>
Sample success responses
XML
format
<DescribeDomainBpsDataByLayerResponse>
<RequestId>C565B910-BC3B-467B-9046-2A48566EA967</RequestId>
<DataInterval>300</DataInterval>
<BpsDataInterval>
<DataModule>
<Value>75.68</Value>
<TrafficValue>2838</TrafficValue>
<TimeStamp>2020-05-06T07:10:00Z</TimeStamp>
</DataModule>
<DataModule>
<Value>99138.85333333333</Value>
<TrafficValue>3717707</TrafficValue>
<TimeStamp>2020-05-06T07:15:00Z</TimeStamp>
</DataModule>
</BpsDataInterval>
</DescribeDomainBpsDataByLayerResponse>
JSON
format
{
"RequestId": "C565B910-BC3B-467B-9046-2A48566EA967",
"DataInterval": 300,
"BpsDataInterval": {
"DataModule": [
{
"Value": 75.68,
"TrafficValue": 2838,
"TimeStamp": "2020-05-06T07:10:00Z"
},
{
"Value": "99138.85333333333",
"TrafficValue": 3717707,
"TimeStamp": "2020-05-06T07:15:00Z"
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.