All Products
Search
Document Center

ApsaraVideo VOD:GetMediaRefreshJobs

Last Updated:Dec 19, 2024

Queries the information about media refresh or prefetch jobs, such as the job status and filtering conditions.

Operation description

You can query the information about all media files or a specific media file in a refresh or prefetch job.

QPS limits

You can call this operation up to 50 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits on API operations in ApsaraVideo VoD.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:GetMediaRefreshJobslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MediaRefreshJobIdstringYes

The ID of the refresh or prefetch job. It is the value of the MediaRefreshJobId parameter that is returned from the call to the RefreshMediaPlayUrls operation.

41d465e31957****
MediaIdstringNo

The ID of the media file. It is the value of the MediaIds parameter that you specify when you call the RefreshMediaPlayUrls operation. You can specify only one media ID.

If you leave this parameter empty, information about all media files in the refresh or prefetch job specified by MediaRefreshJobId is returned. If you set this parameter, only the information about the specified media file is returned.``

ca3a8f6e4957b658067095869****

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58****
MediaRefreshJobsarray<object>

The media refresh or prefetch jobs.

MediaRefreshJobobject

The information about the media refresh or prefetch job.

MediaRefreshJobIdstring

The ID of the job.

41d465e31957****
MediaIdstring

The ID of the media file.

ca3a8f6e4957b658067095869****
TaskTypestring

The type of the job. Valid values:

  • Refresh
  • Preload
Preload
FilterPolicystring

The filtering conditions for stream playback. The value is a JSON string. This parameter is used as a request parameter of the RefreshMediaPlayUrls operation.

{"Formats":"mp4,m3u8", "Definitions":"HD,SD", " StreamType":"video", "ResultType":"Single", " SliceFlag":false, "SliceCount": 3}
Statusstring

The status of the job. Valid values:

  • success
  • fail
success
SuccessPlayUrlsstring

The playback URLs that were refreshed or prefetched.

https://shenzhen.****.aliyuncdn.com/74401a4f546007bf845cd8840****.m3u8,https://shenzhen.****.aliyuncdn.com/24041e7d13582d86604d8****.m3u8
TaskIdsstring

The IDs of the refresh or prefetch tasks for the playback URLs of media files. Only one URL can be refreshed or prefetched in a task. This value is used in the DescribeVodRefreshTasks operation, which queries the status of refresh or prefetch tasks for playback URLs of media files.

70422****,9524****
ErrorCodestring

The error code. This parameter is returned if the refresh or prefetch task fails.

PreloadQueueFull
ErrorMessagestring

The error message. This parameter is returned if the refresh or prefetch task fails.

Preload queue is full, please try again later!
UserDatastring

The user data that you passed when you submit a refresh or prefetch task.

{"MessageCallback":{"CallbackURL":"http://example.aliyundoc.com"}, "Extend":{"localId":"xxx","test":"www"}}
GmtCreatestring

The time when the task was created.

2022-05-20T08:23:22Z
GmtModifiedstring

The time when the task was modified.

2022-05-21T08:23:22Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "MediaRefreshJobs": [
    {
      "MediaRefreshJobId": "41d465e31957****",
      "MediaId": "ca3a8f6e4957b658067095869****",
      "TaskType": "Preload",
      "FilterPolicy": "{\"Formats\":\"mp4,m3u8\", \"Definitions\":\"HD,SD\",  \" StreamType\":\"video\",  \"ResultType\":\"Single\",  \" SliceFlag\":false, \"SliceCount\": 3}",
      "Status": "success",
      "SuccessPlayUrls": "https://shenzhen.****.aliyuncdn.com/74401a4f546007bf845cd8840****.m3u8,https://shenzhen.****.aliyuncdn.com/24041e7d13582d86604d8****.m3u8",
      "TaskIds": "70422****,9524****",
      "ErrorCode": "PreloadQueueFull",
      "ErrorMessage": "Preload queue is full, please try again later!",
      "UserData": "{\"MessageCallback\":{\"CallbackURL\":\"http://example.aliyundoc.com\"}, \"Extend\":{\"localId\":\"xxx\",\"test\":\"www\"}}",
      "GmtCreate": "2022-05-20T08:23:22Z",
      "GmtModified": "2022-05-21T08:23:22Z"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-03-31Add OperationView Change Details