Queries the traffic or bandwidth data of one or more accelerated domain names.
Operation description
-
This operation is available only in the China (Shanghai) region.
-
You can specify up to 100 accelerated domain names in a request. Separate multiple domain names with commas (,). If you do not specify an accelerated domain name, the data of all accelerated domain names within your Alibaba Cloud account is returned.
-
You can query data in the last year. The maximum time range that can be queried is three months. If you specify a time range of one to three days, the system returns data on an hourly basis. If you specify a time range of four days or more, the system returns data on a daily basis.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | No | The accelerated domain name. If you leave this parameter empty, the merged data of all your accelerated domain names is returned. Separate multiple accelerated domain names with commas (,). | example.com |
StartTime | string | Yes | 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. | 2015-12-10T10:20:00Z |
EndTime | string | Yes | The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | 2015-12-10T12:20:00Z |
Field | string | Yes | The type of the data to return. Valid values:
| bps |
Type | string | No | The type of content that you want to query. Valid values:
| static |
Area | string | No | The region in which you want to query data. Valid values:
| CN |
Interval | string | No | The time interval between the data entries to return. Unit: seconds. Valid values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day).
| 300 |
Response parameters
Examples
Sample success responses
JSON
format
{
"EndTime": "2015-12-10T12:20:00Z",
"Type": "static",
"StartTime": "2015-12-10T10:20:00Z",
"RequestId": "B955107D-E658-4E77-****-E0AC3D31693E",
"Area": "CN",
"DomainName": "example.com",
"DataInterval": "300",
"UsageDataPerInterval": {
"DataModule": [
{
"Value": "2592.3920000000003",
"TimeStamp": "2015-12-10T10:00:00Z"
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-30 | The Error code has changed | View Change Details |
Common errors
The following table describes the error codes that this operation can return.
Error code | Error message | HTTP status code | Description |
---|---|---|---|
Throttling | Request was denied due to request throttling. | 503 | The error message returned because the request was denied due to throttling. |
IllegalOperation | Illegal domain, operation is not permitted. | 403 | The error message returned because the domain name is invalid. |
OperationDenied | Your account does not open CDN service yet. | 403 | The error message returned because Alibaba Cloud CDN is not activated for your Alibaba Cloud account. |
OperationDenied | Your CDN service is suspended. | 403 | The error message returned because Alibaba Cloud CDN is suspended for your Alibaba Cloud account. |
InvalidDomain.NotFound | The domain provided does not belong to you. | 404 | The error message returned because the specified domain name does not exist or does not belong to the current account. |
InvalidDomain.Offline | The domain provided is offline. | 404 | The error message returned because the specified domain name is disabled. |
ServiceBusy | The specified Domain is configuring, please retry later. | 403 | The error message returned because the domain name is being configured. Try again later. |
InvalidDomain.Configure_failed | Failed to configure the provided domain. | 500 | The error message returned because the system failed to configure the domain name. |
InvalidParameter | Invalid Parameter. | 400 | The error message returned because one or more parameters are invalid. |
InvalidParameterProduct | Invalid Parameter Product. | 400 | The error message returned because the value of the Product parameter is invalid. |
InvalidParameterArea | Invalid Parameter Area. | 400 | The error message returned because the value of the Area parameter is invalid. |
InvalidParameterField | Invalid Parameter Field. | 400 | The error message returned because the value of the Field parameter is invalid. |
InvalidParameterStartTime | Invalid Parameter StartTime. | 400 | The error message returned because the value of the StartTime parameter is invalid. |
InvalidParameterEndTime | Invalid Parameter EndTime. | 400 | The error message returned because the value of the EndTime parameter is invalid. |
InvalidTimeRange | StartTime and EndTime range should less than 1 month. | 400 | The error message returned because the time range that is specified by the StartTime and EndTime parameters exceeds 31 days. |
InvalidParameterInterval | Invalid Parameter Interval. | 400 | The error message returned because the value of the Interval parameter is invalid. |