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.
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
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. Valid values:
|
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, 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.
|
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.