All Products
Search
Document Center

ApsaraVideo VOD:GetVideoInfo

Last Updated:Dec 14, 2022

Queries basic information about a video. The basic information includes the title, description, duration, thumbnail URL, status, creation time, size, snapshots, category, and tags of the video.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
vod:GetVideoInfoRead
  • VOD
    acs:vod:*:{#accountId}:*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
VideoIdstringYes

The ID of the video.

9b73864d75f1d231e9001cd5f8****

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The ID of the request.

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

The information about the video.

StorageLocationstring

The OSS bucket where the video is stored.

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

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

2017-11-14T09:15:50Z
Statusstring

The video status. Valid values:

  • Uploading: The video is being uploaded.
  • UploadFail: The video failed to be uploaded.
  • UploadSucc: The video has been uploaded.
  • Transcoding: The video is being transcoded.
  • TranscodeFail: The video failed to be transcoded.
  • Blocked: The video failed the review.
  • Normal: The video passed the review.
Normal
CateIdlong

The category ID of the video.

781111****
VideoIdstring

The ID of the video.

9b73864d75f1d231e9001cd5f8****
Tagsstring

The tags of the video. Separate multiple tags with commas (,).

tag1,tag2
ModificationTimestring

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

2017-11-14T10:15:50Z
RegionIdstring

The region ID of the Object Storage Service (OSS) bucket.

cn-shanghai
CustomMediaInfostring

The information about the custom media asset.

NoteThis parameter has been deprecated. This parameter is no longer returned when you call the API.
{"aaa":"test"}
CateNamestring

The category of the video.

category name
Descriptionstring

The description of the video.

video description
AppIdstring

The ID of the application.

app-****
Sizelong

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

10897890
CoverURLstring

The thumbnail URL of the video.

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

The ID of the template group.

9ae2af636ca64835b0c10412f448****
Durationnumber

The duration of the video. Unit: seconds.

135.6
Titlestring

The title of the video.

video title
AuditStatusstring

The review status of the video. Valid values:

  • Normal: pass
  • Blocked: failed
Normal
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****",...]

Example

Normal return example

JSONFormat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "Video": {
    "StorageLocation": "out-201703232251****.oss-cn-shanghai.aliyuncs.com",
    "CreationTime": "2017-11-14T09:15:50Z",
    "Status": "Normal",
    "CateId": 0,
    "VideoId": "9b73864d75f1d231e9001cd5f8****",
    "Tags": "tag1,tag2",
    "ModificationTime": "2017-11-14T10:15:50Z",
    "RegionId": "cn-shanghai",
    "CustomMediaInfo": "{\"aaa\":\"test\"}",
    "CateName": " category name",
    "Description": "video description",
    "AppId": "app-****",
    "Size": 10897890,
    "CoverURL": "https://example.aliyundoc.com/****.jpg",
    "TemplateGroupId": "9ae2af636ca64835b0c10412f448****",
    "Duration": 135.6,
    "Title": "video title",
    "AuditStatus": "Normal",
    "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****\",...]"
    ]
  }
}

Error codes

For a list of error codes, visit the API error center.

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 is returned because the video does not exist.