All Products
Search
Document Center

DescribePlayVideoStatis

Last Updated: Mar 04, 2019

Description

You can call this operation to obtain daily playback statistics for a video 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 DescribePlayVideoStatis.

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.

VideoId String Yes

The ID of the specified video.

Response parameters

Name Type Description
RequestId String

The GUID generated by Alibaba Cloud for the request.

VideoPlayStatisDetails VideoPlayStatisDetail

The daily playback statistics for the specified video.

Examples

Sample requests

  1. https://vod.cn-shanghai.aliyuncs.com?Action=DescribePlayVideoStatis
  2. &Interval=day
  3. &StartTime=2018-01-01T00:00:00Z
  4. &EndTime=2018-01-02T00:00:00Z
  5. &VideoId=2a8d4cb9ecbb487681473a153aba8fda
  6. &<Common request parameters>

Note: For more information about common request parameters, see Common parameters.

Successful response examples

JSON format

  1. {
  2. "RequestId":"A92D3600-A3E7-43D6-8ED9-B6E3B4A1FE6B",
  3. "VideoPlayStatisDetails":{
  4. "VideoPlayStatisDetail":[
  5. {
  6. "Date":"20180101",
  7. "PlayDuration":"3288",
  8. "PlayRange":"<=1m:79.2%;>1<=5m:16.7%;>5<=10m:4.2%",
  9. "Title":"Four streams (one stream encrypted): FD-HLS + LD-MP4 + SD-HLS-encrypted + HD-MP4",
  10. "UV":"1",
  11. "VV":"1"
  12. },
  13. {
  14. "Date":"20180102",
  15. "PlayDuration":"967277",
  16. "PlayRange":"<=1m:79.2%;>1<=5m:16.7%;>5<=10m:4.2%",
  17. "Title":"Four streams (one stream encrypted): FD-HLS + LD-MP4 + SD-HLS-encrypted + HD-MP4",
  18. "UV":"1",
  19. "VV":"24"
  20. }
  21. ]
  22. }
  23. }

Error response examples

JSON format

  1. {
  2. "Code":"InvalidStartTime.Malformed",
  3. "HostId":"vod.cn-shanghai.aliyuncs.com",
  4. "Message":"Specified StartTime is malformed.",
  5. "RequestId":"1FAFB884-D5A7-47D1-82B5-8928AA9C8720"
  6. }

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.