All Products
Search
Document Center

ApsaraVideo VOD:GetVideoInfos

Last Updated:Jul 19, 2024

Queries information such as the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags about multiple audio or video files based on IDs.

Operation description

  • You can specify up to 20 audio or video file IDs in each request.
  • 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

There is currently no authorization information disclosed in the API.

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 response parameters.

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****"]
VideoListarray<object>

The information about the audio or video files.

object

The video snapshot URLs.

Note If no video snapshot is captured, no snapshot information is returned. For more information, see Video snapshots.
StorageLocationstring

The storage address of the audio or video file.

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

The time when the media file was created. The time is 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
  • UploadFail
  • UploadSucc
  • Transcoding
  • TranscodeFail
  • Blocked
  • Normal
Normal
CateIdlong

The ID of the category.

781111****
VideoIdstring

The ID of the audio or video file.

7753d144efd74d6c45fe0570****
DownloadSwitchstring

Indicates whether the offline download feature is enabled. If you enable the offline download feature, users can download and play videos by using the ApsaraVideo Player on a local PC. For more information, see Configure download settings. Valid values:

  • on: the offline download feature is enabled.
  • off: the offline download feature is not enabled.
on
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 last updated. The time is 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.

120
Titlestring

The title of the audio or video file.

Video tiltle
Snapshotsarray

The video snapshot URLs.

string

The video snapshot URL.

Note Only information about the thumbnail snapshot is returned. To obtain information about normal, sprite, source sprite, WebVTT snapshots, call the ListSnapshots operation. 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 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 file is stored as a Cold Archive object.
  • Changing: The storage class of the video file is being changed.
  • SourceChanging: The storage class of the source file is being changed.
Standard
RestoreStatusstring

The restoration status of the audio file. Valid values:

  • Processing
  • Success
  • Failed
Success
RestoreExpirationstring

The period of time in which the audio 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****",
      "DownloadSwitch": "on",
      "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
2024-05-23The response structure of the API has changedView Change Details
2023-04-11The response structure of the API has changedView Change Details

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.