All Products
Search
Document Center

ApsaraVideo Live:DescribeLiveStreamMetricDetailData

Last Updated:Mar 28, 2024

Queries the monitoring data of streams under a domain name. Up to 5,000 rows of data can be returned per call.

Usage notes

  • If you call this operation to query the monitoring data of streams under a domain name for the first time, you must submit a ticket for backend configuration.
  • By default, statistics on the number of viewers who watch streams over the HTTP Live Streaming (HLS) protocol cannot be collected.
  • You can specify only one domain name in each call.
  • The maximum time range to query is 24 hours.
  • The minimum data granularity to query is 1 minute.
  • You can query data in the last 31 days.

QPS limit

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

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 DescribeLiveStreamMetricDetailData

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

DomainName String No example.com
  • The accelerated domain name. You can specify only one domain name. If you specify multiple domain names, errors occur.
  • If you do not specify the AppName and StreamName parameters, monitoring data of all streams under the domain name is returned.
  • If you leave this parameter empty, monitoring data of streams under all domain names is returned.
  • If you specify the DomainName parameter and set both the AppName and StreamName parameters to all, monitoring data of all streams in all applications under the specified domain name is returned.
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. The end time must be later than the start time, and the maximum time range that can be specified is one day. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

AppName String No liveApp****

The name of the application for which you want to query the monitoring data of streams.

Note If you specify the StreamName parameter, you must also specify the AppName parameter.
StreamName String No liveStream****

The name of the stream. The stream must belong to the application that is specified by the AppName parameter.

Note If you specify the StreamName parameter, you must also specify the AppName parameter.
Protocol String No flv

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

You can specify multiple protocols by separating them with commas (,). However, data over multiple protocols is not aggregated and is returned based on streams.

NextPageToken String No UjsM9x3aVcJi9a0-ArwJUTTC67CIBKLw*****

The pagination token used to query data. Up to 5,000 rows of data can be returned per query. If the number of rows exceeds 5,000, a token that determines the start point of the next query is provided in the response. If you specify this parameter, data continues to be obtained from the end of the previous query.

Response parameters

Parameter

Type

Example

Description

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

The end of the time range during which the data was queried.

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

The beginning of the time range during which the data was queried.

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

The request ID.

NextPageToken String UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=

The pagination token that can be used in the next request to retrieve a new page of results. This parameter is returned if more data results are available.

PageSize Integer 5000

The number of rows returned.

DomainName String example.com

The accelerated domain name.

StreamDetailData Array of StreamData

The data array returned.

StreamData
P2pTraffic Long 4102

The amount of traffic over peer-to-peer (P2P) protocols. Unit: bytes.

Note This parameter is not returned if no traffic is generated over the protocols.
RtmpBps Float 3323

The bandwidth over the Real-Time Messaging Protocol (RTMP) protocol. Unit: bit/s.

Note This parameter is not returned if no bandwidth is consumed over the protocol.
HlsBps Float 4456

The bandwidth over the HLS protocol. Unit: bit/s.

Note This parameter is not returned if no bandwidth is consumed over the protocol.
P2pBps Float 6845

The bandwidth over P2P protocols. Unit: bit/s.

Note This parameter is not returned if no bandwidth is consumed over the protocols.
StreamName String test.flv

The name of the stream.

P2pCount Long 78

The number of online viewers over P2P protocols.

Note This parameter is not returned if no viewers exist over the protocols.
Traffic Long 423304182

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

RtmpCount Long 63

The number of online viewers over the RTMP protocol.

Note This parameter is not returned if no viewers exist over the protocol.
RtsCount Long 89

The number of online viewers over the Real-Time Streaming (RTS) protocol.

Note This parameter is not returned if no viewers exist over the protocol.
RtsBps Float 2361

The bandwidth over the RTS protocol. Unit: bit/s.

Note This parameter is not returned if no bandwidth is consumed over the protocol.
Bps Float 423304182.66

The average bandwidth consumed by the stream per minute. Unit: bit/s.

HlsTraffic Long 568

The amount of traffic over the HLS protocol. Unit: bytes.

Note This parameter is not returned if no traffic is generated over the protocol.
FlvBps Float 454

The bandwidth over the Flash Video (FLV) protocol. Unit: bit/s.

Note This parameter is not returned if no bandwidth is consumed over the protocol.
Count Long 423304182

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

RtsTraffic Long 2322

The amount of traffic over the RTS protocol. Unit: bytes.

Note This parameter is not returned if no traffic is generated over the protocol.
RtmpTraffic Long 5568

The amount of traffic over the RTMP protocol. Unit: bytes.

Note This parameter is not returned if no traffic is generated over the protocol.
HlsCount Long 56

The number of online viewers over the HLS protocol.

Note This parameter is not returned if no viewers exist over the protocol.
AppName String app

The name of the application.

FlvCount Long 32

The number of online viewers over the FLV protocol.

Note This parameter is not returned if no viewers exist over the protocol.
FlvTraffic Long 1254

The amount of traffic over the FLV protocol. Unit: bytes.

Note This parameter is not returned if no traffic is generated over the protocol.
TimeStamp String 2015-12-10T20:00:00Z

The timestamp of the data returned.

NewConns String 450

The number of new connections established for the stream per minute.

Examples

Sample requests

http(s)://live.aliyuncs.com?Action=DescribeLiveStreamMetricDetailData
&DomainName=example.com  
&StartTime=2015-12-10T20:00:00Z  
&EndTime=2015-12-10T21:00:00Z  
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidStartTime.Malformed Specified StartTime is malformed. The format of the start time is invalid. Check whether the value of the StartTime parameter is valid.
400 InvalidEndTime.Malformed Specified EndTime is malformed. The format of the end time is invalid. Check whether the value of the EndTime parameter is valid.
400 InvalidEndTime.Mismatch Specified end time does not math the specified start time. The end time does not match the start time. Check whether the value of the EndTime parameter matches.
400 InvalidTimeSpan The time span exceeds the limit. The time range exceeds the limit. Configure a valid time range to query.
400 InvalidPageToken The token of page is invalid. The specified pagination token is invalid. Specify a valid value returned from the previous query and ensure that the request parameters are not modified.
400 InvalidAppName.Mismatch The AppName param must be passed. The value specified for AppName is invalid. Check whether the value of the AppName parameter is valid.
400 InvalidStreamProtocol.NotSupport The specified stream protocol is not support. The specified streaming protocol is not supported. Check the protocols that are supported.
400 InvalidStreamName.LengthTooLong The specified stream name is too long. The length of the stream name exceeds the limit. Specify a valid value for the StreamName parameter.
400 InvalidAppName.LengthTooLong The specified app name is too long. The length of the application name exceeds the limit. Specify a valid value for the AppName parameter.
400 InvalidTime.ValueNotSupported Specified Time is malformed. The start time and end time do not match.

For a list of error codes, see Service error codes.