All Products
Search
Document Center

ApsaraVideo VOD:GetVideoInfos

Last Updated:Oct 19, 2023

Obtains information about multiple audio or video files.

Operation Description

You can call this operation to obtain the basic information about multiple videos at a time based on video IDs. The basic information includes the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags of each video.

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.

debugging

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
    acs:vod:*:{#accountId}:*
    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 period of time in which the object remains in the restored state.

StorageLocationstring

The Object Storage Service (OSS) bucket where the video file is stored.

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

The time when the 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. By default, videos in all states are returned. Multiple states are separated by commas (,). Valid values:

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

The ID of the video category.

781111****
VideoIdstring

The ID of the video.

7753d144efd74d6c45fe0570****
Tagsstring

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

tag1, tag2
ModificationTimestring

The time when the 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 video category.

This is a category name.
Descriptionstring

The description of the video.

This is a category description.
AppIdstring

The ID of the application.

app-****
Sizelong

The size of the video mezzanine file. Unit: byte.

453
CoverURLstring

The URL of the video thumbnail.

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

The ID of the template group that was used to transcode the video.

b4039216985f4312a5382a4ed****
Durationfloat

The duration of the video. Unit: seconds.

120
Titlestring

The title of the video.

Video tiltle
Snapshotsarray

The URL array of video snapshots.

string

The URL array of 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 is being modified.
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 object 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 operation changes.see changesets
Change itemChange content
Output ParametersThe response structure of the API operation changes.

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.