Queries the resource usage data of specific domain names in a specified billable region.

Usage notes

  • You can query the resource usage data for a maximum of 100 domain names at a time. Separate domain names with commas (,). If you do not set the DomainName parameter, the resource usage data for all domain names within your Alibaba Cloud account is returned. You cannot query the URL usage data of a single domain name.
  • The data that is returned by this operation can be used as a reference to calculate the resource usage for billing.

QPS limit

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.

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 parameters

Parameter Type Required Example Description
Action String Yes DescribeDomainUsageData

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

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 the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String Yes 2015-12-10T21:00: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.

The end time must be later than the beginning time but cannot be more than 31 days later than the beginning time.

Field String Yes traf

The type of the resource usage data to query. Valid values:

  • bps: bandwidth
  • traf: network traffic
DomainName String No example.com

The streaming domain.

  • You can specify multiple domain names and separate them with commas (,).
  • If you do not set this parameter, the resource usage data for all domain names within your Alibaba Cloud account is returned.
Area String No CN

The ID of the billable region. Valid values:

  • CN: Chinese mainland
  • OverSeas: countries and regions outside the Chinese mainland
  • 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 regions
Note

If you do not set this parameter, the default value CN is used. Alibaba Cloud supports the following countries and regions outside mainland China:

  • Asia Pacific 1: Hong Kong (China), Japan, Taiwan (China), Macau (China), and Southeast Asian countries excluding Vietnam and Indonesia
  • Asia Pacific 2: India, Indonesia, South Korea, and Vietnam
  • Asia Pacific 3: Australia and New Zealand North America: US and Canada
  • South America: Brazil
  • Europe: Russia, Ukraine, Britain, France, Netherlands, Spain, Italy, Sweden, and Germany
  • Middle East and Africa: South Africa, Oman, UAE, and Kuwait
Interval String No 300

The time interval at which the resource usage data is to be queried. Unit: seconds. Valid values:

  • 300
  • 3600
  • 86400
Note
  • If you do not set this parameter or the specified value is invalid, the default value 300 is used.
  • If you do not set the Interval parameter, the maximum time range in which the resource usage data can be queried in a call is one month. If you specify a time range of one to three days in a call, the time interval between the entries that are returned is one hour. If you specify a time range of more than three days in a call, the time interval between the entries that are returned is one day.
  • If you set the Interval parameter to 300, the maximum time range in which the resource usage data can be queried in a call is three days.
  • If you set the Interval parameter to 300, you can query the data of the last six months at most.
  • If you set the Interval parameter to 3600 or 86400, you can query the data of the last year at most.
Type String No all

The type of content based on which the resource usage data to be queried was generated. Valid values:

  • rts: Real-Time Streaming (RTS) bandwidth or traffic
  • all: all content
Note

Stable resource usage data is generated in T+N mode. T indicates a point in time for data query. N equals 2 hours.

For example, you can retrieve the stable resource usage data for 13:00 on December 21 and before at 15:00 on December 21.

Response parameters

Parameter Type Example Description
DomainName String example.com

The streaming domain.

DataInterval String 300

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

UsageDataPerInterval Array of DataModule

The resource usage data that was collected for each time interval.

DataModule
TimeStamp String 2015-12-10T20:00:00Z

The timestamp of the data returned. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Value String 423304182

The amount of resources consumed.

  • If the value of the Field parameter is traf, the returned data is measured in bytes.
  • If the value of the Field parameter is bps, the returned data is measured in bit/s.
RequestId String B955107D-E658-4E77-B913-E0AC3D31693E

The ID of the request.

StartTime String 2015-12-10T20:00Z

The beginning of the time range in which the resource usage data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

EndTime String 2015-12-10T21:00Z

The end of the time range in which the resource usage data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Area String CN

The billable region where the resource usage data was generated.

Field String traf

The type of the resource usage data. Valid values:

  • bps: bandwidth
  • traf: network traffic

Examples

Sample requests

http://live.aliyuncs.com/?Action=DescribeDomainUsageData&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T21:00:00Z
&Type=traf
&Area=CN
&<Common request parameters>

Sample success responses

XML format

<DescribeDomainUsageDataResponse>
  <DomainName>example.com</DomainName>
  <DataInterval>300</DataInterval>
  <UsageDataPerInterval>
        <DataModule>
              <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
              <Value>423304182</Value>
        </DataModule>
        <DataModule>
              <TimeStamp>2015-12-10T20:05:00Z</TimeStamp>
              <Value>454680793</Value>
        </DataModule>
        <DataModule>
              <TimeStamp>2015-12-10T20:10:00Z</TimeStamp>
              <Value>501718342</Value>
        </DataModule>
        <DataModule>
              <TimeStamp>2015-12-10T20:15:00Z</TimeStamp>
              <Value>434816025</Value>
        </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>
</DescribeDomainUsageDataResponse>

JSON format

{
    "DomainName": "example.com",
    "DataInterval": "300",
    "UsageDataPerInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T20:00:00Z",
                "Value": "423304182"
            },
            {
                "TimeStamp": "2015-12-10T20:05:00Z",
                "Value": "454680793"
            },
            {
                "TimeStamp": "2015-12-10T20:10:00Z",
                "Value": "501718342"
            },
            {
                "TimeStamp": "2015-12-10T20:15:00Z",
                "Value": "434816025"
            }
        ]
    },
    "RequestId": "B955107D-E658-4E77-B913-E0AC3D31693E",
    "StartTime": "2015-12-10T20:00Z",
    "EndTime": "2015-12-10T21:00Z",
    "Area": "CN",
    "Type": "traf"
}

Error codes

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

Special error codes

Error code

Description

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 Live service yet.

403

The error message returned because ApsaraVideo Live is not activated.

OperationDenied

Your Live service is suspended.

403

The error message returned because ApsaraVideo Live has been suspended.

InvalidDomain.NotFound

The domain provided does not belong to you.

404

The error message returned because the domain name does not exist or does not belong to the current user.

InvalidDomain.Offline

The domain provided is offline.

404

The error message returned because the domain name has been taken offline.

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 domain name failed to be configured.

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.