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

Usage notes

Note If you call this operation to query the monitoring data of streams for a specified domain name for the first time, submit a ticket and wait for the backend settings to complete.
  • 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 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 DescribeLiveStreamMetricDetailData

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

DomainName String Yes 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 for the 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 is 1 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. Separate multiple protocols with commas (,). However, data over multiple protocols is not aggregated and is returned based on the stream.

NextPageToken String No UjsM9x3aVcJi9a0-ArwJUTTC67CIBKLw*****

The token used to query data by page. 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 data was queried.

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

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

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

The ID of the request.

NextPageToken String UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=

The token that determines the start point of the next query. 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 stream data array returned.

StreamData
P2pTraffic Long 4102

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

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

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

Note This parameter is not returned if no traffic is generated over the protocol.
HlsBps Float 4456

The bandwidth over the HTTP Live Streaming (HLS) protocol. Unit: bit/s.

Note This parameter is not returned if no traffic is generated over the protocol.
P2pBps Float 6845

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

Note This parameter is not returned if no traffic is generated over the protocol.
StreamName String test.flv

The name of the stream.

P2pCount Long 78

The number of online viewers over the P2P protocol.

Note This parameter is not returned if no traffic is generated over the protocol.
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 traffic is generated 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 traffic is generated over the protocol.
RtsBps Float 2361

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

Note This parameter is not returned if no traffic is generated over the protocol.
Bps Float 423304182.66

The total 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 traffic is generated 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 traffic is generated 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 traffic is generated 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 returned data.

Examples

Sample request

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>
    <DomainName>example.com</DomainName>
    <NextPageToken>UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=</NextPageToken>
    <StreamDetailData>
        <StreamData>
            <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
            <AppName>app</AppName>
            <StreamName>test.flv</StreamName>
            <Count>423304182</Count>
            <Traffic>423304182</Traffic>
            <Bps>423304182.66</Bps>
        </StreamData>
        <StreamData>
            <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
            <AppName>test1</AppName>
            <StreamName>app</StreamName>
            <Count>423304182</Count>
            <Traffic>423304182</Traffic>
            <Bps>423304182.66</Bps>
        </StreamData>
        <StreamData>
            <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
            <AppName>app</AppName>
            <StreamName>test2</StreamName>
            <Count>423304182</Count>
            <Traffic>423304182</Traffic>
            <Bps>423304182.66</Bps>
        </StreamData>
        <StreamData>
            <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
            <AppName>app</AppName>
            <StreamName>test3</StreamName>
            <Count>423304182</Count>
            <Traffic>423304182</Traffic>
            <Bps>423304182.66</Bps>
        </StreamData>
    </StreamDetailData>
    <RequestId>B955107D-E658-4E77-B913-E0AC3D31693E</RequestId>
    <StartTime>2015-12-10T20:00Z</StartTime>
    <EndTime>2015-12-10T21:00Z</EndTime>
    <PageSize>5000</PageSize>
</DescribeLiveStreamMetricDetailDataResponse>

JSON format

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

{
  "DomainName" : "example.com",
  "NextPageToken" : "UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=",
  "StreamDetailData" : {
    "StreamData" : [ {
      "TimeStamp" : "2015-12-10T20:00:00Z",
      "AppName" : "app",
      "StreamName" : "test.flv",
      "Count" : 423304182,
      "Traffic" : 423304182,
      "Bps" : 4.2330418266E8
    }, {
      "TimeStamp" : "2015-12-10T20:00:00Z",
      "AppName" : "test1",
      "StreamName" : "app",
      "Count" : 423304182,
      "Traffic" : 423304182,
      "Bps" : 4.2330418266E8
    }, {
      "TimeStamp" : "2015-12-10T20:00:00Z",
      "AppName" : "app",
      "StreamName" : "test2",
      "Count" : 423304182,
      "Traffic" : 423304182,
      "Bps" : 4.2330418266E8
    }, {
      "TimeStamp" : "2015-12-10T20:00:00Z",
      "AppName" : "app",
      "StreamName" : "test3",
      "Count" : 423304182,
      "Traffic" : 423304182,
      "Bps" : 4.2330418266E8
    } ]
  },
  "RequestId" : "B955107D-E658-4E77-B913-E0AC3D31693E",
  "StartTime" : "2015-12-10T20:00Z",
  "EndTime" : "2015-12-10T21:00Z",
  "PageSize" : "5000"
}

Error codes

HttpCode Error code Error message Description
400 InvalidStartTime.Malformed Specified StartTime is malformed. The error message returned because 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 error message returned because 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 error message returned because 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 error message returned because the time range exceeds the limit. Configure a valid time range to query.
400 InvalidPageToken The token of page is invalid. The error message returned because the specified token used for paged query 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 error message returned because the application name does not match. Check whether the value of the AppName parameter is valid.
400 InvalidStreamProtocol.NotSupport The specified stream protocol is not support. The error message returned because the specified protocol is not supported. Check the protocols that are supported.
400 InvalidStreamName.LengthTooLong The specified stream name is too long. The error message returned because 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 error message returned because 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 error message returned because the time range specified by the StartTime and EndTime parameters is invalid.

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