All Products
Search
Document Center

ApsaraVideo VOD:RestoreMedia

Last Updated:Jul 19, 2024

Restores media assets.

Operation description

You can call this operation to restore only Archive and Cold Archive audio and video files. You can access the audio and video files after the files are restored. You cannot change the storage class of an audio or video file that is being restored. You are charged for the retrieval traffic generated during restoration. After a Cold Archive audio or video file is restored, a Standard replica of the file is generated for access. You are charged for the storage of the replica before the file returns to the frozen state.

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
MediaIdsstringYes

The ID of the media asset (VideoId). Separate multiple IDs with commas (,). You can specify a maximum of 20 IDs. You can use one of the following methods to obtain the ID of the media asset:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Video and Audio page, view the ID of the media asset. This method is applicable to files that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of VideoId from the response to the CreateUploadVideo operation that you call to upload media assets.
  • Obtain the value of VideoId from the response to the SearchMedia operation that you call to query the media ID after the media asset is uploaded.
8bc8e94fe4e55abde85718****,eb186180e989dd56****
ScopestringNo

The modification range. Valid values:

  • All: restores all resources, including the source files and transcoded streams.
  • SourceFile: restores only the source files.
All
RestoreDaysstringNo

The number of days during which media assets remain in the restored state. Default value: 1. The maximum validity period of a restored Archive media asset is 7 days and the maximum validity period of a restored Cold Archive media asset is 365 days.

2
RestoreTierstringNo

The restoration priority. This parameter is required only when you restore a Cold Archive media file. Valid values:

  • Expedited: The file is restored within 1 hour.
  • Standard: The file is restored within 2 to 5 hours.
  • Bulk: The file is restored within 5 to 12 hours.
Standard

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

8E70E3F8-E2EE-47BC-4677-379D6F28****
Successboolean

Indicates whether the request was successful.

true
IgnoredListarray

The IDs of the media assets that failed to be obtained.

string

The ID of the media asset that failed to be obtained.

['7f29b8d0c5fa71ed9685e6f7d559****']
ForbiddenListarray<object>

The IDs of the media asset that failed to be processed.

object

The information about the media asset that failed to be processed.

MediaIdstring

The ID of the media asset.

fa10ee70898671edb99f6eb3690d****
Reasonstring

The reason for the failure.

Forbidden.RestoreMedia

Examples

Sample success responses

JSONformat

{
  "RequestId": "8E70E3F8-E2EE-47BC-4677-379D6F28****",
  "Success": true,
  "IgnoredList": {
    "MediaId": [
      "['7f29b8d0c5fa71ed9685e6f7d559****']"
    ]
  },
  "ForbiddenList": {
    "MediaForbiddenReasonDTO": [
      {
        "MediaId": "fa10ee70898671edb99f6eb3690d****",
        "Reason": "Forbidden.RestoreMedia"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-04-11The internal configuration of the API is changed, but the call is not affectedView Change Details