All Products
Search
Document Center

ApsaraVideo Live:DescribeDomainUsageData

Last Updated:Aug 18, 2025

Call the DescribeDomainUsageData operation to query usage data for one or more domain names in a specific billing region.

Operation description

  • This operation supports batch queries for domain names. To query multiple domain names, separate them with commas (,). You can query up to 100 domain names at a time. If you do not specify the DomainName parameter, the operation returns data for all domain names that are associated with your account.

  • Usage data includes traffic, bandwidth, and the number of requests. The units are bytes, bps, and counts, respectively.

  • If you do not specify the Interval parameter, you can query data that was generated within the last year. The maximum time range for a single query is 31 days. If the time range is from 1 to 3 days, data is returned with hourly granularity. If the time range is longer than 3 days, data is returned with daily granularity.

  • If you specify the Interval parameter, the maximum time range for a single query, the queryable historical data range, and the data latency are as follows:

Time granularity

Maximum time range for a single query

Queryable historical data range

Data latency

5 minutes

3 days

93 days

15 minutes

1 hour

31 days

186 days

4 hours

1 day

90 days

366 days

4:00 AM on the next day

QPS limit

The queries per second (QPS) limit for a single user is 10. If you exceed this limit, API calls are throttled. This may affect your business. Plan your calls accordingly.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:DescribeDomainUsageData

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The ID of the region.

cn-shanghai

DomainName

string

No

The live streaming domain name.

  • You can query a single domain name or multiple domain names. To query multiple domain names, separate them with commas (,).

  • If you leave this parameter empty, the operation returns the merged data for all your live streaming domain names.

example.com

StartTime

string

Yes

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

2015-12-10T20:00:00Z

EndTime

string

Yes

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

The end time must be later than the start time. The time range cannot exceed 31 days.

2015-12-10T21:00:00Z

Type

string

No

The type of usage data to query.

If Field is set to bps or traf, valid values are:

  • rts: Real-Time Streaming (RTS) bandwidth or traffic.

  • quic: QUIC bandwidth or traffic.

If Field is set to req_traf or req_bps, valid values are:

  • push: Stream ingest bandwidth or traffic.

  • push_proxy: Relayed stream ingest bandwidth or traffic.

all

Field

string

Yes

The type of usage data to query. Valid values:

  • bps: Playback bandwidth.

  • traf: Traffic.

  • req_traf: Stream ingest traffic if Type is set to push, or relayed stream ingest traffic if Type is set to push_proxy.

  • req_bps: Stream ingest bandwidth if Type is set to push, or relayed stream ingest bandwidth if Type is set to push_proxy.

traf

Area

string

No

The region. Valid values:

  • CN: The Chinese mainland.

  • OverSeas: 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 specify this parameter, the default value is CN. The regions are defined as follows:Asia Pacific 1: Hong Kong (China), Macao (China), Taiwan (China), Japan, and Southeast Asian countries excluding Vietnam and Indonesia.Asia Pacific 2: Indonesia, South Korea, and Vietnam.Asia Pacific 3: Australia and New Zealand.North America: United States and Canada.South America: Brazil.Europe: Ukraine, United Kingdom, France, Netherlands, Spain, Italy, Sweden, and Germany.Middle East and Africa: South Africa, Oman, United Arab Emirates, and Kuwait.

CN

DataProtocol

string

No

The protocol of the data to query. Valid values:

  • http: HTTP.

  • https: HTTPS.

  • quic: QUIC.

  • all (default): All of the preceding protocols.

all

Interval

string

No

The time granularity of the data to query, in seconds. This forces the operation to return data with a specific granularity. Valid values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day).

300

Note

When you query data for a specific time T, the stable data for that time becomes available two hours later.
For example, if you query data for 1:00 PM on December 21, you can retrieve stable data for 1:00 PM and earlier at 3:00 PM on December 21.

Response parameters

Parameter

Type

Description

Example

object

EndTime

string

The end of the time range. The time is in UTC and the format is yyyy-MM-ddTHH:mm:ssZ.

2015-12-10T21:00Z

Type

string

The type of usage data.

all

StartTime

string

The start of the time range. The time is in UTC and the format is yyyy-MM-ddTHH:mm:ssZ.

2015-12-10T20:00Z

RequestId

string

The ID of the request.

B955107D-E658-4E77-B913-E0AC3D31693E

Area

string

The usage region.

CN

DomainName

string

The live streaming domain name.

example.com

DataInterval

string

The time interval between data records, in seconds.

300

UsageDataPerInterval

object

DataModule

array<object>

The usage data for each record.

object

Value

string

The usage value.

  • If Field is set to traf or req_traf, the unit is bytes.

  • If Field is set to bps or req_bps, the unit is bps.

  • If Field is set to acc, the unit is counts.

423304182

TimeStamp

string

The start time of the time slice. The time is in UTC and the format is yyyy-MM-ddTHH:mm:ssZ.

2015-12-10T20:00:00Z

## Special error codes | Error code | Error message | HTTP status code | Description | | --- | --- | --- | --- | | Throttling | Request denied due to throttling. | 503 | The request was denied because the request rate exceeded the allowed limit. | | IllegalOperation | Operation not permitted for this domain. | 403 | The specified domain name is invalid. | | OperationDenied | ApsaraVideo Live is not activated. | 403 | ApsaraVideo Live is not activated for your account. | | OperationDenied | Your ApsaraVideo Live service is suspended. | 403 | Your ApsaraVideo Live service is suspended. | | InvalidDomain.NotFound | The specified domain was not found. | 404 | The specified domain name does not exist or does not belong to your account. | | InvalidDomain.Offline | The specified domain is disabled. | 404 | The specified domain name is disabled. | | ServiceBusy | The domain is being configured. Try again later. | 403 | The specified domain name is being configured. You can try again later. | | InvalidDomain.Configure_failed | Failed to configure the domain. | 500 | Configuration of the specified domain name failed. | | InvalidParameter | Invalid parameter. | 400 | One or more parameters are invalid. | | InvalidParameterProduct | Invalid Product parameter. | 400 | The value of the Product parameter is invalid. | | InvalidParameterArea | Invalid Area parameter. | 400 | The value of the Area parameter is invalid. | | InvalidParameterField | Invalid Field parameter. | 400 | The value of the Field parameter is invalid. | | InvalidParameterStartTime | Invalid StartTime parameter. | 400 | The value of the StartTime parameter is invalid. | | InvalidParameterEndTime | Invalid EndTime parameter. | 400 | The value of the EndTime parameter is invalid. | | InvalidTimeRange | The time range cannot exceed 31 days. | 400 | The time range specified by the StartTime and EndTime parameters exceeds 31 days. | | InvalidParameterInterval | Invalid Interval parameter. | 400 | The value of the Interval parameter is invalid. |

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 InvaildParameter Invalid Parameter Invalid request parameter.
400 InvalidStartTime.Malformed Specified StartTime is malformed.
400 InvalidEndTime.Malformed Specified EndTime is malformed.
400 InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported. The value specified for the StartTime parameter is invalid.
400 InvalidTime.Malformed Specified Time is malformed. Invalid time. Check whether the time that you specified is correct.
400 InvalidParameterField The specified Field is invalid. The Field parameter is set to an invalid value.
400 InvalidParameterType The specified Type is invalid. The Type parameter is set to an invalid value.
400 InvalidEndTime.Mismatch Specified end time does not math the specified start time. The end time does not match the start time. Make sure that the start and end times match.
400 InvalidTimeSpan The time span exceeds the limit. The time span exceeds the limit. Please refer to the API documentation to specify a reasonable time span.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.