Queries the number of historical online users for a live stream.
Usage note
The overall latency lasts 2 to 5 minutes.
QPS limit
A single user can perform a maximum of 30 queries per second (QPS). Throttling is triggered when the number of calls per second exceeds the QPS limit. The throttling may affect your business. Thus, we recommend that you observe the QPS limit on this operation. For more information about what a single user means and the QPS details, see QPS limit on an API operation in ApsaraVideo Live.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeLiveStreamHistoryUserNum |
The operation that you want to perform. Set the value to DescribeLiveStreamHistoryUserNum. |
AppName | String | Yes | liveApp**** |
The application to which the domain name belongs. |
DomainName | String | Yes | example.com |
The streaming domain. |
EndTime | String | Yes | 2017-12-22T08:00:00Z |
The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note The duration specified by the StartTime and EndTime parameters cannot exceed one day.
The time specified by the EndTime parameter must be earlier than the current time.
|
StartTime | String | Yes | 2017-12-21T08: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. Note You can query data that is collected in the last 30 days.
|
StreamName | String | Yes | liveStream**** |
The domain name. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F5FF8 |
The ID of the request. |
LiveStreamUserNumInfos | Array of LiveStreamUserNumInfo |
The number of historical online users for the live stream. |
|
LiveStreamUserNumInfo | |||
UserNum | String | 1 |
The number of users. |
StreamTime | String | 2017-10-20T06:20:00Z |
The time at which the live stream was played. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=DescribeLiveStreamHistoryUserNum
&AppName=liveApp****
&DomainName=example.com
&EndTime=2017-12-22T08:00:00Z
&StartTime=2017-12-21T08:00:00Z
&StreamName=liveStream****
&<Common request parameters>
Sample success responses
XML
format
<DescribeLiveStreamHistoryUserNumResponse>
<LiveStreamUserNumInfos>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:20:00Z</StreamTime>
<UserNum>0</UserNum>
</LiveStreamUserNumInfo>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:19:00Z</StreamTime>
<UserNum>0</UserNum>
</LiveStreamUserNumInfo>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:18:00Z</StreamTime>
<UserNum>15</UserNum>
</LiveStreamUserNumInfo>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:17:00Z</StreamTime>
<UserNum>0</UserNum>
</LiveStreamUserNumInfo>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:16:00Z</StreamTime>
<UserNum>0</UserNum>
</LiveStreamUserNumInfo>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:15:00Z</StreamTime>
<UserNum>6</UserNum>
</LiveStreamUserNumInfo>
<LiveStreamUserNumInfo>
<StreamTime>2017-10-20T06:14:00Z</StreamTime>
<UserNum>0</UserNum>
</LiveStreamUserNumInfo>
</LiveStreamUserNumInfos>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F5FF8</RequestId>
</DescribeLiveStreamHistoryUserNumResponse>
JSON
format
{
"LiveStreamUserNumInfos":{
"LiveStreamUserNumInfo":[
{
"StreamTime":"2017-10-20T06:20:00Z",
"UserNum":0
},
{
"StreamTime":"2017-10-20T06:19:00Z",
"UserNum":0
},
{
"StreamTime":"2017-10-20T06:18:00Z",
"UserNum":15
},
{
"StreamTime":"2017-10-20T06:17:00Z",
"UserNum":0
},
{
"StreamTime":"2017-10-20T06:16:00Z",
"UserNum":0
},
{
"StreamTime":"2017-10-20T06:15:00Z",
"UserNum":6
},
{
"StreamTime":"2017-10-20T06:14:00Z",
"UserNum":0
}
]
},
"RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F5FF8"
}
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 correct. |
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 correct. |
For a list of error codes, visit the API Error Center.