Queries the resource usage information about specified domain names in a specified region.

Note Usage data includes network traffic (measured in bytes), bandwidth values (measured in bits/s), and the number of requests.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameter

Parameter Type Required Example Description
Action String Yes DescribeDcdnDomainUsageData

The operation that you want to perform. Set the value to DescribeDcdnDomainUsageData.

EndTime String Yes 2015-12-10T22:00:00Z

The end of the time range to query. Specify the time in the ISO 8601 standard in yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note The end time must be later than the start time. The maximum time range that can be queried is 31 days.
Field String Yes bps

The type of the data to be queried. Valid values:

  • bps: bandwidth
  • traf: traffic
  • acc: requests
Note acc does not support the Area parameter.
StartTime String Yes 2015-12-10T20:00:00Z

The beginning of the time range to query. Specify the time in the ISO 8601 standard in yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note The minimum interval at which the data is collected is 5 minutes.
DataProtocol String No all

The protocol of the data to query. Valid values:

  • quic: Quick UDP Internet Connections (QUIC)
  • https: HTTPS
  • http: HTTP
  • all: all the preceding protocols

The default value is all.

DomainName String No example.com

The accelerated domain names that you want to query. You can specify at most 100 domain names at a time. Separate multiple domain names with commas (,).

Note If you do not specify an accelerated domain name, all accelerated domain names that belong to your Alibaba Cloud account are queried.
Area String No CN

The ID of the area. Valid values:

  • CN: mainland China
  • OverSeas: regions outside mainland China
  • AP1: Asia Pacific 1
  • AP2: Asia Pacific 2
  • AP3: Asia Pacific 3
  • NA: North America
  • SA: South America
  • EU: Europe
  • MEAA: Middle East and Africa
  • all: all the preceding areas

The default value is CN.

Interval String No 300

The time interval between the data entries to return. Unit: seconds. Valid values: 300 (5 minutes), 3600 (1 hour), and 86400 (one day).

  • If you set the Interval parameter to 300, you can query data that was collected within the last six months. In this case, the maximum time range that can be queried in each call is three days.
  • If you set the Interval parameter to 3600 or 86400, you can query data that was collected within the last year.
  • If you do not set the Interval parameter, the maximum time range that can be queried in each call is one month. If you specify a time range of one to three days for a query, the time interval between the entries that are returned is one hour. If you specify a time range of at least four days for a query, the time interval between the entries that are returned is one day.

Parameter combinations

The following table describes the correlations between the billable items and parameters. For more information about the calling method, see the sample request.

Billable item

Valid value of DataProtocol

Valid value of Type

Valid value of Field

Valid value of Area

Network traffic

all. The value of this parameter can be empty.

all. The value of this parameter can be empty.

traf

CN

OverSeas

AP1

AP2

AP3

NA

SA

EU

MEAA

Bandwidth

all. The value of this parameter can be empty.

all. The value of this parameter can be empty.

bps

CN

OverSeas

AP1

AP2

AP3

NA

SA

EU

MEAA

Number of HTTPS requests for static content

https

static

acc

all

Number of HTTP requests for dynamic content

http

dynamic

acc

all

Number of HTTPS requests for dynamic content

https

dynamic

acc

all

Response parameters

Parameter Type Sample response Description
Area String CN

The area where resource usage is queried.

DataInterval String 300

The time interval between the data entries. Unit: seconds.

DomainName String example.com

The accelerated domain name that is queried.

EndTime String 2015-12-10T22:00:00Z

The end of the time range to query data.

RequestId String B955107D-E658-4E77-B913-E0AC3D31693E

The ID of the request.

StartTime String 2015-12-10T20:00:00Z

The start of the time range to query data.

Type String static

The type of the content that is requested.

UsageDataPerInterval Array of DataModule

The information about the network traffic collected at each interval.

DataModule
PeakTime String 2015-12-10T21:30:00Z

If the Field parameter in the request is set to bps, this parameter returns the time of the highest bandwidth value. Otherwise, this parameter returns the same value as the TimeStamp parameter.

SpecialValue String 4233041**

The data usage in a specific scenario.

Note Indicates the data usage in a specific scenario. If no special billable item is specified, ignore this parameter.
TimeStamp String 2015-12-10T21:30:00Z

The timestamp of the data returned.

Value String 4233041**

The amount of data that was used.

Examples

Sample requests

Query data usage in mainland China
http(s)://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainUsageData
&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T22:00:00Z
&Field=traf
&Area=CN
&<Common request parameters>

Query bandwidth usage in Europe
http(s)://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainUsageData
&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T22:00:00Z
&Field=bps
&Area=EU
&<Common request parameters>

Number of HTTPS requests for static content 
http(s)://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainUsageData
&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T22:00:00Z
&Type=static
&DataProtocol=https
&Field=acc
&Area=all
&<Common request parameters>

Number of HTTP requests for dynamic content 
http(s)://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainUsageData
&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T22:00:00Z
&Type=dynamic
&DataProtocol=http
&Field=acc
&Area=all
&<Common request parameters>

Number of HTTPS requests for dynamic content 
http(s)://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainUsageData
&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T22:00:00Z
&Type=dynamic
&DataProtocol=https
&Field=acc
&Area=all
&<Common request parameters>

Sample success response

XML format

<DescribeDcdnDomainUsageDataResponse>
  <DomainName>example.com</DomainName>
  <DataInterval>300</DataInterval>
  <UsageDataPerInterval>
        <DataModule>
              <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
              <PeakTime>2015-12-10T20:05:00Z</PeakTime>
              <Value>4233041**</Value>
              <SpecialValue>4233041**</SpecialValue>
        </DataModule>
        <DataModule>
              <TimeStamp>2015-12-10T21:00:00Z</TimeStamp>
              <PeakTime>2015-12-10T21:30:00Z</PeakTime>
              <Value>4546807**</Value>
              <SpecialValue>4233041**</SpecialValue>
        </DataModule>
  </UsageDataPerInterval>
  <RequestId>B955107D-E658-4E77-B913-E0AC3D31693E</RequestId>
  <StartTime>2015-12-10T20:00Z</StartTime>
  <EndTime>2015-12-10T21:00Z</EndTime>
  <Area>CN</Area>
  <Type>traf</Type>
</DescribeDcdnDomainUsageDataResponse>

JSON format

{
    "DomainName": "example.com",
    "DataInterval": "300",
    "UsageDataPerInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T20:00:00Z",
                "PeakTime": "2015-12-10T20:05:00Z",
                "Value": "4233041**",
                "SpecialValue": "4233041**"
            },
            {
                "TimeStamp": "2015-12-10T21:00:00Z",
                "PeakTime": "2015-12-10T21:30:00Z",
                "Value": "4546807**",
                "SpecialValue": "4233041**"
            }
        ]
    },
    "RequestId": "B955107D-E658-4E77-B913-E0AC3D31693E",
    "StartTime": "2015-12-10T20:00Z",
    "EndTime": "2015-12-10T21:00Z",
    "Area": "CN",
    "Type": "traf"
}

Error codes

HttpCode Error code Error message Description
400 InvalidParameter The specified parameter is invalid. The error message returned because a parameter is set to an invalid value.
400 InvalidParameterProduct The specified Product is invalid. The error message returned because the value of the Product parameter is invalid.
400 InvalidParameterArea The specified Area is invalid. The error message returned because the value of the Area parameter is invalid.
400 InvalidParameterField The specified Field is invalid. The error message returned because the value of the Field parameter is invalid.
400 InvalidParameterStartTime The specified StartTime is invalid. The error message returned because the specified start time is invalid.
400 InvalidParameterEndTime The specified EndTime is invalid. The error message returned because the specified end time is invalid.
400 InvalidTimeRange The time span between the StartTime and the EndTime cannot exceed 31 days. The error message returned because the time range that is specified by the StartTime and EndTime parameters exceeds 31 days.
400 InvalidParameterInterval The specified Interval is invalid. The error message returned because the value of the Interval parameter is invalid.

For a list of error codes, visit the API Error Center.