All Products
Search
Document Center

ApsaraVideo VOD:DescribeVodMediaPlayData

更新時間:Sep 26, 2024

Queries the playback statistics based on the media ID. You can call this operation to query information such as the number of visits, average video views per viewer, total number of views, average playback duration per viewer, and total playback duration.

Operation description

  • This operation is available only in the China (Shanghai) region.

  • Only playback data in ApsaraVideo Player SDK is collected.

  • You can query only data within the last 30 days.

  • Before you call this operation, make sure that the following requirements are met:

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vod:DescribeVodMediaPlayDatanone
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PlayDatestringNo

The playback time. Specify the value in the yyyyMMdd format.

Note
  • You can query data only by day.
  • You can query only data within the last 30 days.
  • 20240322
    TerminalTypestringNo

    The type of the player SDK. You can specify this parameter to query all playback data generated by using a specific type of player SDK. Valid values:

    • Native: ApsaraVideo Player SDK for Android or ApsaraVideo Player SDK for iOS
    • Web: ApsaraVideo Player SDK for Web
    Native
    OsstringNo

    The operating system of the player. You can specify this parameter to query all playback data generated on a specific operating system. Valid values:

    • Android
    • iOS
    • Windows
    • macOS
    • Linux
    Android
    RegionstringNo

    The region in which ApsaraVideo VOD is activated. You can specify this parameter to query all playback data generated only in a specific region. Valid values:

    • cn-beijing: China (Beijing)
    • cn-shanghai: China (Shanghai)
    • cn-shenzhen: China (Shenzhen)
    • ap-northeast-1: Japan (Tokyo)
    • ap-southeast-1: Singapore
    • ap-southeast-5: Indonesia (Jakarta)
    • eu-central-1: Germany (Frankfurt)
    cn-beijing
    MediaIdstringNo

    The ID of the media file (VideoId). You can specify this parameter to query all playback data of a media file. You can specify only one media ID. You can use one of the following methods to obtain the ID:

    • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the page that appears, view the media ID.
    • Obtain the value of the VideoId parameter in the response to the CreateUploadVideo operation that you called to upload the audio or video file.
    • Obtain the value of VideoId by calling the SearchMedia operation. This method is applicable to files that have been uploaded.
    9ae2af636ca6c10412f44891fc****
    PageNolongYes

    The number of the page. You can specify a page number to return data from the specified page.

    1
    PageSizelongYes

    The number of entries per page. Maximum value: 100.

    20
    OrderTypestringNo

    The sort type. This parameter must be specified together with the OrderName parameter. You can specify this parameter to sort the returned data in ascending or descending order based on specific metrics. Valid values:

    • ASC: The returned data is sorted in ascending order.
    • DESC: The returned data is sorted in descending order.
    ASC
    OrderNamestringNo

    The name of the metric. This parameter must be specified together with the OrderType parameter. You can specify this parameter to sort the returned data in ascending or descending order based on specific metrics. Valid values:

    • PlaySuccessVv: the total number of views.
    • PlayPerVv: the average views per viewer.
    • PlayDuration: the total playback duration.
    • PlayDurationPerUv: the average playback duration per viewer.
    PlaySuccessVv

    Response parameters

    ParameterTypeDescriptionExample
    object

    The returned result.

    RequestIdstring

    The ID of the request.

    25818875-5F78-4AF6-D7393642CA58****
    TotalCountlong

    The total number of entries returned.

    1
    PageNolong

    The page number.

    1
    PageSizelong

    The number of entries per page.

    20
    QoeInfoListarray<object>

    The data returned.

    Dataobject
    VideoTitlenumber

    The name of the audio or video file.

    title
    VideoDurationfloat

    The duration of the audio or video file. Unit: seconds.

    246
    MediaIdstring

    The ID of the media file (VideoId).

    9ae2af636ca6c10412f44891fc****
    DAUfloat

    The number of visits to the audio or video per day.

    5
    PlaySuccessVvfloat

    The total number of times the audio or video has been played.

    20
    PlayDurationPerUvfloat

    The average playback duration of the audio or video per viewer. Unit: seconds.

    120
    PlayDurationfloat

    The total playback duration of the audio or video. Unit: seconds.

    2400
    PlayPerVvfloat

    The average number of times that the audio or video was played per viewer.

    4

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
      "TotalCount": 1,
      "PageNo": 1,
      "PageSize": 20,
      "QoeInfoList": [
        {
          "VideoTitle": 0,
          "VideoDuration": 246,
          "MediaId": "9ae2af636ca6c10412f44891fc****",
          "DAU": 5,
          "PlaySuccessVv": 20,
          "PlayDurationPerUv": 120,
          "PlayDuration": 2400,
          "PlayPerVv": 4
        }
      ]
    }

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-05-07The Error code has changed. The response structure of the API has changedView Change Details