All Products
Search
Document Center

ApsaraVideo VOD:GetVideoInfos

Last Updated:May 22, 2024

Obtains information about multiple audio or video files.

Operation description

  • You can call this operation to obtain basic information about multiple media files based on media IDs. The basic information includes the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags.
  • After a media file is uploaded, ApsaraVideo VOD processes the source file. Then, information about the media file is asynchronously generated. You can configure notifications for the VideoAnalysisComplete event and call this operation to query information about a media file after you receive notifications for the VideoAnalysisComplete event. For more information, see Overview .

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

Request parameters

ParameterTypeRequiredDescriptionExample
VideoIdsstringYes

The list of video IDs. Separate multiple IDs with commas (,). A maximum of 20 IDs can be specified.

7753d144efd8e649c6c45fe0579****,7753d144efd74d6c45fe0570****

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

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

The IDs of the videos that do not exist.

string

The IDs of the videos that do not exist.

["7753d144efd8e649c6c45fe0579****"]
VideoListobject []

The information about the audio or video files.

StorageLocationstring

The storage address of the audio or video file.

out-****.oss-cn-shanghai.aliyuncs.com
CreationTimestring

The time when the audio or video file was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

2017-06-26T05:38:48Z
Statusstring

The status of the video. Valid values:

  • Uploading: The video is being uploaded.
  • UploadFail: The video failed to be uploaded.
  • UploadSucc: The video is uploaded.
  • Transcoding: The video is being transcoded.
  • TranscodeFail: The video failed to be transcoded.
  • Blocked: The video is blocked.
  • Normal: The video is normal.
Normal
CateIdlong

The ID of the category.

781111****
VideoIdstring

The ID of the audio or video file.

7753d144efd74d6c45fe0570****
Tagsstring

The tags of the audio or video file. Multiple tags are separated by commas (,).

tag1, tag2
ModificationTimestring

The time when the audio or video file was updated. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

2017-06-26T06:38:48Z
CateNamestring

The name of the category.

This is a category name.
Descriptionstring

The description of the audio or video file.

This is a category description.
AppIdstring

The ID of the application.

app-****
Sizelong

The size of the source file. Unit: bytes.

453
CoverURLstring

The thumbnail URL of the audio or video file.

https://example.aliyundoc.com/****.jpg
TemplateGroupIdstring

The ID of the transcoding template group.

b4039216985f4312a5382a4ed****
Durationfloat

The duration of the audio or video file. Unit: seconds. 86,400 seconds is equivalent to 24 hours.

120
Titlestring

The title of the audio or video file.

Video tiltle
Snapshotsarray

The URL array of video snapshots.

string

The URL of the video snapshot.

Note The snapshot information is returned only for videos in which snapshots are captured. For more information, see Video snapshots.
["http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****","http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****",...]
StorageClassstring

The storage class of the audio or video file. Valid values:

  • Standard: All media resources are stored as Standard objects.
  • IA: All media resources are stored as IA objects.
  • Archive: All media resources are stored as Archive objects.
  • ColdArchive: All media resources are stored as Cold Archive objects.
  • SourceIA: Only the source files are IA objects.
  • SourceArchive: Only the source files are Archive objects.
  • SourceColdArchive: Only the source files are Cold Archive objects.
  • Changing: The storage class of the audio or video file is being changed.
  • SourceChanging: The storage class of the source file is being changed.
Standard
RestoreStatusstring

The restoration status of the audio or video file. Valid values:

  • Processing
  • Success
  • Failed
Success
RestoreExpirationstring

The period of time in which the audio or video file remains in the restored state.

2023-03-30T10:14:14Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "NonExistVideoIds": [
    "[\"7753d144efd8e649c6c45fe0579****\"]"
  ],
  "VideoList": [
    {
      "StorageLocation": "out-****.oss-cn-shanghai.aliyuncs.com",
      "CreationTime": "2017-06-26T05:38:48Z",
      "Status": "Normal",
      "CateId": 0,
      "VideoId": "7753d144efd74d6c45fe0570****",
      "Tags": "tag1, tag2",
      "ModificationTime": "2017-06-26T06:38:48Z",
      "CateName": "This is a category name.",
      "Description": "This is a category description.",
      "AppId": "app-****",
      "Size": 453,
      "CoverURL": "https://example.aliyundoc.com/****.jpg",
      "TemplateGroupId": "b4039216985f4312a5382a4ed****",
      "Duration": 120,
      "Title": "Video tiltle",
      "Snapshots": [
        "[\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****\",\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****\",...]"
      ],
      "StorageClass": "Standard",
      "RestoreStatus": "Success",
      "RestoreExpiration": "2023-03-30T10:14:14Z"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-04-11The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.

Common errors

The following table describes the common errors that this operation can return.

Error codeError messageHTTP status codeDescription
InvalidVideo.NotFoundThe video does not exist.404The error message returned because the video does not exist.