All Products
Search
Document Center

ApsaraVideo VOD:GetMediaRefreshJobs

最終更新日:Jul 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

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

Authorization information

There is currently no authorization information disclosed in the API.

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.

object

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