DescribeLiveUserStreamMetricData
Queries batch data at the stream granularity for a specified accelerated domain name and supports multiple protocols.
Operation description
Queries for the number of new connections over the HLS protocol are not supported. Concurrent connections over HLS are counted based on requests in the default format. To count requests in special formats, submit a ticket. The default formats are as follows:
Sample m3u8 request: http(s)://example.aliyundoc.com/Appname/StreamName.m3u8
Sample ts request: http(s)://example.aliyundoc.com/Appname/StreamName/153xxxxxxxx_137xxxxx.ts
Request description
Single query limit: A single query returns a maximum of 5,000 rows of data.
Domain name query limit: Only a single domain name can be queried. Specifying multiple domain names causes an error.
Time span limit: The maximum time span for a query is 24 hours.
Time granularity limit: The minimum time granularity for a query is 1 minute.
Query range limit: The maximum time range for a query is 31 days.
Call frequency limit: The call frequency for a single user is 10 calls per second.
Special parameter combination: When
DomainNameis not empty and bothAppNameandStreamNameare set toall, the aggregation data for the accelerated domain name is returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:DescribeLiveUserStreamMetricData |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
No |
The accelerated domain name to query. Note
Only a single domain name can be queried. Specifying multiple domain names causes an error. If this parameter is left empty, the aggregation data of all accelerated domain names under the user is queried. If |
test.com |
| StartTime |
string |
Yes |
The start time of the data to retrieve. Specify the time in the ISO 8601 standard in the |
2015-12-10T20:00:00Z |
| EndTime |
string |
Yes |
The end time of the data to retrieve. The end time must be later than the start time, and the time span cannot exceed 1 day. Specify the time in the ISO 8601 standard in the |
2015-12-10T21:00:00Z |
| AppName |
string |
No |
The application name. Specify an application name to query data at the stream granularity for the corresponding application. If you specify |
app |
| StreamName |
string |
No |
The stream name. If you specify |
test.flv |
| Protocol |
string |
No |
The stream protocol. Specify a stream protocol to query data for the corresponding protocol. Valid values: Note
The rts option can be used to query Real-Time Streaming (RTS) streams over the ARTC protocol.
|
flv |
| PageNumber |
integer |
Yes |
The current page number. |
1 |
| PageSize |
integer |
Yes |
The number of entries per page. Maximum value: 5000. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| DomainName |
string |
The accelerated domain name. |
test.com |
| EndTime |
string |
YYYY-MM-DDThh:mm:ssZ |
2015-12-10T21:00:00Z |
| PageSize |
integer |
The number of entries returned per page. |
10 |
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F**** |
| StartTime |
string |
The start time of the data. The time is displayed in UTC and follows the ISO 8601 standard. Format: |
2015-12-10T20:00:00Z |
| StreamDetailData |
array<object> |
The traffic data collected at each time interval. |
|
|
object |
The returned data array. |
||
| AppName |
string |
The application name. This value is returned regardless of whether it is specified. |
app |
| Bps |
number |
The total bandwidth of the stream per minute. Unit: |
423304182.66 |
| Count |
integer |
The total number of concurrent connections to the stream per minute. Note
Concurrent connections refers to the statistics of the number of connections to client processes under the same stream within a unit of time. |
423304182 |
| FlvBps |
number |
The bandwidth of the FLV protocol. Unit: |
454 |
| FlvCount |
integer |
The number of concurrent connections over the FLV protocol. This parameter is not returned if the specified protocol is not FLV. |
32 |
| FlvTraffic |
number |
The traffic of the FLV protocol. Unit: |
1254 |
| HlsBps |
number |
The bandwidth of the HLS protocol. Unit: |
4456 |
| HlsCount |
integer |
The number of concurrent connections over the HLS protocol. This parameter is not returned if the specified protocol is not HLS. |
56 |
| HlsTraffic |
number |
The traffic of the HLS protocol. Unit: |
568 |
| NewConns |
integer |
The number of new connections to the stream per minute. |
450 |
| P2pBps |
number |
The bandwidth of the P2P protocol. Unit: |
6845 |
| P2pCount |
integer |
The number of concurrent connections over the P2P protocol. This parameter is not returned if the specified protocol is not P2P. |
78 |
| P2pTraffic |
number |
The traffic of the P2P protocol. Unit: |
4102 |
| RtmpBps |
number |
The bandwidth of the RTMP protocol. Unit: |
3323 |
| RtmpCount |
integer |
The number of concurrent connections over the RTMP protocol. This parameter is not returned if the specified protocol is not RTMP. |
63 |
| RtmpTraffic |
number |
The traffic of the RTMP protocol. Unit: |
5568 |
| RtsBps |
number |
The bandwidth of the RTS protocol. Unit: |
2361 |
| RtsCount |
integer |
The number of concurrent connections over the RTS protocol. This parameter is not returned if the specified protocol is not RTS. |
89 |
| RtsTraffic |
number |
The traffic of the RTS protocol. Unit: |
2322 |
| StreamName |
string |
The stream name. This value is returned regardless of whether it is specified. |
test.flv |
| TimeStamp |
string |
The start time of the time slice. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format according to the ISO 8601 standard in the UTC+0 time zone. |
2015-12-10T20:00:00Z |
| Traffic |
number |
The total traffic of the stream per minute. Unit: |
423304182 |
| TotalCount |
integer |
The total number of entries. |
50 |
| PageNumber |
integer |
The page number. |
1 |
Examples
Success response
JSON format
{
"DomainName": "test.com",
"EndTime": "2015-12-10T21:00:00Z",
"PageSize": 10,
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F****",
"StartTime": "2015-12-10T20:00:00Z",
"StreamDetailData": [
{
"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
}
],
"TotalCount": 50,
"PageNumber": 1
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Meter.ParamError | Param Error:%s,Please Check Again. | An error message was returned. |
| 500 | Meter.ServerInternalError | The Request Processing Has Failed Due To Some Unknown Error. | An internal service error occurred. |
| 500 | Meter.DataSourceQueryError | Data Source Error:%s,Please Try Again. | A data query error occurred. |
| 403 | Meter.AuthError | Authentication Failed,Please Try Again. | Authentication failed. |
| 502 | Meter.ReadyTsError | Get ReadyTs Failed,Please Try Again. | The queried data is not ready yet. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.