All Products
Search
Document Center

ApsaraVideo Live:DescribeLiveStreamMetricDetailData

Last Updated:Jun 16, 2026

Queries stream-level batch data for a specified domain name. A maximum of 5,000 rows of data can be returned per query.

Operation description

If this is the first time you use this operation to query stream-level data for a specified domain name, submit a ticket to request backend configuration before using this operation. Provide the following information in the ticket:

  • The domain name to query.

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

  • The maximum number of concurrent viewers per live stream.

  • The protocol types included in client requests.

Important This operation will no longer be maintained after September 31, 2025. Switch to the new stream-level operation DescribeLiveUserStreamMetricData promptly. The new stream-level operation does not require backend configuration.
.

Before you begin

  • Online viewer counting for HLS is not supported by default.

  • Only a single domain name can be queried at a time.

  • Maximum large query time span: 24 hours.

  • Minimum query granularity: 1 minute.

  • Maximum query range: 31 days.

Rate limit

The single-user QPS limit for this operation is 10 calls per second. If this limit is exceeded, the API call is throttled, which may affect your business. Call this operation appropriately.

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.

Valid values:

  • cn-shenzhen :

    cn-shenzhen

cn-shenzhen

DomainName

string

No

  • The accelerated domain name to query. Only a single domain name can be queried at a time. An error is returned if multiple domain names are specified.

  • If AppName and StreamName are not specified, stream-level data for all streams under the domain name is returned.

  • If the domain name is left empty, aggregate data for all accelerated domain names under the account is returned.

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

  • When you specify DomainName, make sure the domain name is a live streaming domain and the user calling this operation has the required permissions on 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, and the difference cannot exceed 1 day. 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 application name. Specify this parameter to query stream-level data for a specific application.

Note

If you specify StreamName, you must also specify AppName.

liveApp****

StreamName

string

No

The stream name. Specify this parameter together with AppName to return stream-level data.

Note

If you specify StreamName, you must also specify AppName.

liveStream****

Protocol

string

No

The stream protocol. Valid values: flv, hls, rtmp, rts, and p2p.

You can query data for multiple protocols by separating them with commas (,). Data for multiple protocols is not aggregated and is output at the stream level.

Note

The rts option queries Real-Time Streaming (RTS) streams that use the ARTC protocol.

  • When using rts, you may need to additionally collect statistics for the xxx_AliRTS-opus transcoding stream. This is because when playing an RTS stream on the web, a transcoding stream with the _AliRTS-opus suffix appended to the stream name is automatically generated. For more information, see RTS sub-second latency automatic transcoding.

flv

NextPageToken

string

No

The paged query token. A maximum of 5,000 rows of data can be returned per query. If the data to query exceeds 5,000 rows, the response includes the starting index for the next paging request. Pass this token in the request to continue querying data from where the previous query ended.

UjsM9x3aVcJi9a0-ArwJUTTC67CIBKLw*****

Response elements

Element

Type

Description

Example

object

The query data.

DomainName

string

The accelerated domain name queried.

example.com

EndTime

string

The end time. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

2015-12-10T21:00:00Z

NextPageToken

string

The starting index for the next query. This value is returned when the queried data has not been fully retrieved.

UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=

PageSize

integer

The number of returned data rows.

5000

RequestId

string

The request ID.

B955107D-E658-4E77-B913-E0AC3D31693E

StartTime

string

The start time. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

2015-12-10T20:00:00Z

StreamDetailData

object

StreamData

array<object>

The returned data set.

object

The returned data set.

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.