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.
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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:DescribeLiveStreamMetricDetailData |
none |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shenzhen |
| DomainName |
string |
No |
|
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.
|
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.