All Products
Search
Document Center

ApsaraVideo Live:DescribeLiveStreamMetricDetailData

Last Updated:Aug 19, 2025

Call the DescribeLiveStreamMetricDetailData operation to query batch data for streams under a specified domain name. A single query can return a maximum of 5,000 rows of data.

Operation description

If you are querying stream-level data for a domain name for the first time, you must first submit a ticket to perform the backend configuration. Provide the following information in the ticket:

  • The domain name that you want to query.

  • The maximum number of concurrent live streams for the domain name.

  • The maximum number of concurrent online viewers for each live stream.

  • The protocol types included in client requests.

Important

This operation will no longer be maintained after September 30, 2025. We recommend that you switch to the new stream-level operation DescribeLiveUserStreamMetricData. The new operation can be used without backend configuration.

Limits

  • By default, this operation does not support querying the number of online viewers for HLS streams.

  • You can query data for only one domain name at a time.

  • The maximum time range for a query is 24 hours.

  • The minimum data granularity is 1 minute.

  • You can query data from the last 31 days.

QPS limits

The queries per second (QPS) limit for a single user is 10. If the limit is exceeded, API calls are throttled, which may affect your business. We recommend that you call this operation at a reasonable rate.

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:DescribeLiveStreamMetricDetailData

none

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shenzhen

DomainName

string

No

  • The accelerated domain name that you want to query. You can query only one domain name at a time. If you specify multiple domain names, an error is returned.

  • If you do not specify AppName and StreamName, data about all streams for the domain name is returned.

  • If you leave this parameter empty, aggregate data for all accelerated domain names that belong to your account is queried.

  • If you specify a domain name and set both AppName and StreamName to all, aggregate data for the specified accelerated domain name is returned.

  • If you specify a domain name, make sure that it is a live streaming domain name and you have the permissions to operate the domain name.

example.com

StartTime

string

Yes

The start 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-10T20:00:00Z

EndTime

string

Yes

The end of the time range to query. The end time must be later than the start time. The time range cannot exceed 24 hours. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

2015-12-10T21:00:00Z

AppName

string

No

The name of the application. If you specify an application name, data about streams in the application is queried.

Note

If you specify StreamName, you must also specify AppName.

liveApp****

StreamName

string

No

The name of the stream. If you specify a stream name, data about the stream is returned.

Note

If you specify StreamName, you must also specify AppName.

liveStream****

Protocol

string

No

The name of the streaming protocol. Valid values: flv, hls, rtmp, rts, and p2p.

You can query data for multiple protocols. Separate the protocols with commas (,). Data for different protocols is not aggregated but returned at the stream level.

Note

The rts option lets you query data about Real-Time Streaming (RTS) streams that use the ARTC protocol.

  • When you use rts, you may need to collect statistics on transcoded streams whose names end with _AliRTS-opus. This is because when an RTS stream is played on a web client, a transcoded stream is automatically generated. The name of the transcoded stream is the original stream name with the _AliRTS-opus suffix. For more information, see Automatic transcoding for RTS streams.

flv

NextPageToken

string

No

The token that is used for a paged query. A single query can return a maximum of 5,000 rows of data. If the data to be queried exceeds 5,000 rows, the response provides a token that you can use to start the next query. If you include this token in the next request, the query starts from the next row after the last query.

UjsM9x3aVcJi9a0-ArwJUTTC67CIBKLw*****

Response parameters

Parameter

Type

Description

Example

object

The queried data.

DomainName

string

The accelerated domain name that was queried.

example.com

EndTime

string

The end of the time range.

2015-12-10T21:00:00Z

NextPageToken

string

The token for the next query. This parameter is returned if the data is not completely returned in the current query.

UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=

PageSize

integer

The number of data rows returned.

5000

RequestId

string

The request ID.

B955107D-E658-4E77-B913-E0AC3D31693E

StartTime

string

The start of the time range.

2015-12-10T20:00:00Z

StreamDetailData

object

StreamData

array<object>

The data returned.

object

The data returned.

AppName

string

The application name.

app

Bps

number

The average bandwidth of the stream per minute. Unit: bps.

423304182.66

Count

integer

The total number of online viewers for the stream per minute.

423304182

FlvBps

number

The bandwidth of the FLV stream. Unit: bps.

Note

This parameter is not returned if the specified protocol is not used.

454

FlvCount

integer

The number of online viewers for the FLV stream.

Note

This parameter is not returned if the specified protocol is not used.

32

FlvTraffic

integer

The traffic of the FLV stream. Unit: bytes.

Note

This parameter is not returned if the specified protocol is not used.

1254

HlsBps

number

The bandwidth of the HLS stream. Unit: bps.

Note

This parameter is not returned if the specified protocol is not used.

4456

HlsCount

integer

The number of online viewers for the HLS stream.

Note

This parameter is not supported.

56

HlsTraffic

integer

The traffic of the HLS stream. Unit: bytes.

Note

This parameter is not returned if the specified protocol is not used.

568

NewConns

string

The number of new connections to the stream per minute.

450

P2pBps

number

The bandwidth of the P2P stream. Unit: bps.

Note

This parameter is not returned if the specified protocol is not used.

6845

P2pCount

integer

The number of online viewers for the P2P stream.

Note

This parameter is not returned if the specified protocol is not used.

78

P2pTraffic

integer

The traffic of the P2P stream. Unit: bytes.

Note

This parameter is not returned if the specified protocol is not used.

4102

RtmpBps

number

The bandwidth of the RTMP stream. Unit: bps.

Note

This parameter is not returned if the specified protocol is not used.

3323

RtmpCount

integer

The number of online viewers for the RTMP stream.

Note

This parameter is not returned if the specified protocol is not used.

63

RtmpTraffic

integer

The traffic of the RTMP stream. Unit: bytes.

Note

This parameter is not returned if the specified protocol is not used.

5568

RtsBps

number

The bandwidth of the RTS stream. Unit: bps.

Note

This parameter is not returned if the specified protocol is not used.

2361

RtsCount

integer

The number of online viewers for the RTS stream.

Note

This parameter is not returned if the specified protocol is not used.

89

RtsTraffic

integer

The traffic of the RTS stream. Unit: bytes.

Note

This parameter is not returned if the specified protocol is not used.

2322

StreamName

string

The stream name.

test.flv

TimeStamp

string

The start of the time slice.

2015-12-10T20:00:00Z

Traffic

integer

The total traffic of the stream per minute. Unit: bytes.

423304182

Examples

Success response

JSON format

{
  "DomainName": "example.com",
  "EndTime": "2015-12-10T21:00:00Z",
  "NextPageToken": "UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=",
  "PageSize": 5000,
  "RequestId": "B955107D-E658-4E77-B913-E0AC3D31693E",
  "StartTime": "2015-12-10T20:00:00Z",
  "StreamDetailData": {
    "StreamData": [
      {
        "AppName": "app",
        "Bps": 423304182.66,
        "Count": 423304182,
        "FlvBps": 454,
        "FlvCount": 32,
        "FlvTraffic": 1254,
        "HlsBps": 4456,
        "HlsCount": 56,
        "HlsTraffic": 568,
        "NewConns": "450",
        "P2pBps": 6845,
        "P2pCount": 78,
        "P2pTraffic": 4102,
        "RtmpBps": 3323,
        "RtmpCount": 63,
        "RtmpTraffic": 5568,
        "RtsBps": 2361,
        "RtsCount": 89,
        "RtsTraffic": 2322,
        "StreamName": "test.flv",
        "TimeStamp": "2015-12-10T20:00:00Z",
        "Traffic": 423304182
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidStartTime.Malformed Specified StartTime is malformed.
400 InvalidEndTime.Malformed Specified EndTime is malformed.
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.
400 InvalidPageToken The token of page is invalid. The specified paging token is incorrect. Specify the correct token returned by the last query and confirm that your request parameters are not modified.
400 InvalidAppName.Mismatch The AppName param must be passed. The AppName parameter does not match. Make sure that you specify the correct AppName.
400 InvalidStreamProtocol.NotSupport The specified stream protocol is not support.
400 InvalidStreamName.LengthTooLong The specified stream name is too long.
400 InvalidAppName.LengthTooLong The specified app name is too long.
400 InvalidTime.ValueNotSupported Specified Time is malformed. The specified time is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.