You can call the DescribeLiveGrtnDuration operation to query usage data for co-streaming duration.
Operation description
The maximum time span for a query is 31 days.
The minimum time granularity for a query is 5 minutes.
You can query data from the last 90 days.
QPS limit
The queries per second (QPS) limit for this operation is 10 calls per second per user. API calls that exceed this limit 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:DescribeLiveGrtnDuration |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| StartTime |
string |
Yes |
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. |
2022-10-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 span between the start and end times must be between 5 minutes and 31 days, inclusive. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. |
2022-10-10T21:00:00Z |
| AppId |
string |
No |
The application ID. You can query multiple application IDs. Separate multiple IDs with commas (,). You can query up to 30 IDs. If you do not specify this parameter, the aggregated data of all applications is returned. |
4346289a-a790-4869-9e23-22766d5e**** |
| Area |
string |
No |
The area code. Valid values:
If you do not specify this parameter, aggregated data for all areas is returned. |
CN |
| Interval |
string |
No |
The time granularity of the data to query. Unit: seconds. Valid values:
If you do not specify this parameter or specify an unsupported value, the default value 3600 is used. |
3600 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| RequestId |
string |
The request ID. |
4B460F8B-993C-4F48-B98A-910811DEBFEB |
| StreamDetailData |
object |
||
| StreamData |
array<object> |
The details of co-streaming usage data. |
|
|
object |
The details of co-streaming usage data. |
||
| AppId |
string |
The application ID. |
4346289a-a790-4869-9e23-22766d5e**** |
| Duration |
integer |
The co-streaming duration. Unit: minutes. |
30 |
| MediaProfile |
string |
The media profile. Valid values:
|
480P |
| MediaType |
string |
The media type. Valid values:
|
audio |
| TimeStamp |
string |
The start time of the time slice. |
2022-12-10T20:00:00Z |
Examples
Success response
JSON format
{
"RequestId": "4B460F8B-993C-4F48-B98A-910811DEBFEB",
"StreamDetailData": {
"StreamData": [
{
"AppId": "4346289a-a790-4869-9e23-22766d5e****",
"Duration": 30,
"MediaProfile": "480P",
"MediaType": "audio",
"TimeStamp": "2022-12-10T20:00:00Z"
}
]
}
}
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 | InvalidTime.Malformed | Specified StartTime or EndTime is malformed. | |
| 400 | InvalidAreaParameter | The specified Area parameter is invalid. | The specified Area parameter is invalid. Specify a correct region code. |
| 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 | InvalidAppIdParameter | The specified AppId parameter is invalid. | |
| 400 | InvalidInstanceIdParameter | The specified InstanceId parameter is invalid. | |
| 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.