Description
You can call this operation to obtain the average daily playback statistics for videos in a specified time range.
Notes:
- Playback statistics are collected only from videos played through the ApsaraVideo Player SDK.
- Playback statistics for the previous day are generated at 09:00 Beijing time (UTC+08:00) every morning.
- You can query data for a maximum duration of 90 days starting from January 1, 2018.
Request parameters
Name | Type | Required | Description |
---|---|---|---|
Action | String | Yes | The operation that you want to perform. Set the value to DescribePlayUserAvg. |
StartTime | String | Yes | The start time of queried data. The value must be in UTC, for example, 2018-01-29T00:00:00Z. You can query data starting from January 1, 2018. That is, the value of the StartTime parameter must be greater than or equal to 2018-01-01T00:00:00Z. |
EndTime | String | Yes | The end time of queried data. The value must be in UTC, for example, 2018-02-01T00:00:00Z. |
Response parameters
Name | Type | Description |
---|---|---|
RequestId | String | The GUID generated by Alibaba Cloud for the request. |
UserPlayStatisAvgs | UserPlayStatisAvgs | The average daily playback statistics for videos. |
Examples
Sample requests
https://vod.cn-shanghai.aliyuncs.com?Action=DescribePlayUserAvg
&StartTime=2018-01-01T00:00:00Z
&EndTime=2018-01-03T00:00:00Z
&<Common request parameters>
Note: For more information about common request parameters, see Common parameters.
Successful response examples
JSON format
{
{
"UserPlayStatisAvgs": {
"UserPlayStatisAvg": [
{
"AvgPlayDuration": "1035902.8",
"Date": "20180101",
"AvgPlayCount": "17.0"
},
{
"AvgPlayDuration": "3113356.7",
"Date": "20180102",
"AvgPlayCount": "41.0"
},
{
"AvgPlayDuration": "4290368.0",
"Date": "20180103",
"AvgPlayCount": "59.8"
}
]
},
"RequestId": "6C7F90B2-BDA4-4FAC-BAAD-A38A121DFE19"
}
}
Error response examples
JSON format
{
"Code":"InvalidStartTime.Malformed",
"HostId":"vod.cn-shanghai.aliyuncs.com",
"Message":"Specified StartTime is malformed.",
"RequestId":"1FAFB884-D5A7-47D1-82B5-8928AA9C8720"
}
Error codes
The following table lists the error codes that this operation can return. For more information, see Error codes.
Error code | Error message | HTTP status code | Description |
---|---|---|---|
InternalError | The request processing has failed due to some unknown error. | 500 | The error message returned when an unknown error occurred in the background. |
InvalidStartTime.Malformed | Specified StartTime is malformed. | 400 | The error message returned when the format of the specified StartTime parameter value is invalid. The value must be in UTC, for example, 2016-06-29T19:00:00Z. |
InvalidEndTime.Malformed | Specified EndTime is malformed. | 400 | The error message returned when the format of the specified EndTime parameter value is invalid. The value must be in UTC, for example, 2016-06-30T19:00:00Z. |
InvalidEndTime.BeyondCurrent | EndTime beyond current time. | 400 | The error message returned when the time specified by the EndTime parameter is later than the current time. |
InvalidEndTime.Mismatch | StartTime or EndTime is mismatch. | 400 | The error message returned when the start time and end time do not match. That is, the end time is earlier than the start time, or the duration from the start time to the end time exceeds 90 days. |