All Products
Search
Document Center

ApsaraVideo VOD:GetVideoList

Last Updated:Jul 19, 2024

Queries information about media files.

Operation description

You can call this operation to query information about media files based on the filter conditions that you specify, such as video status and category ID. Information about a maximum of 5,000 media files can be returned for each request. We recommend that you set the StartTime and EndTime parameters to specify a time range for each request. For more information about how to query information about more media files or even all media files, see SearchMedia .

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
CateIdlongNo

The ID of the category. You can use one of the following methods to obtain the category ID:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Configuration Management > Media Management > Categories to view the category ID.
  • Obtain the value of CateId from the response to the AddCategory operation.
  • Obtain the value of CateId from the response to the GetCategories operation.
781111
StatusstringNo

The status of the video. You can specify multiple video statuses and separate them with commas (,). 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.
  • checking: The video is being reviewed.
  • Blocked: The video is blocked.
  • Normal: The video is normal.
  • ProduceFail: The video failed to be produced.

For more information about each video status, see the "Status: the status of a video" section of the Basic data types topic.

Uploading,Normal
PageNointegerNo

The number of the page to return. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Default value: 10. Maximum value: 100.

10
SortBystringNo

The sorting method of the results. Valid values:

  • CreationTime:Desc (default): The results are sorted in reverse chronological order based on the creation time.
  • CreationTime:Asc: The results are sorted in chronological order based on the creation time.
CreationTime:Asc
StartTimestringNo

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2017-01-11T12:00:00Z
EndTimestringNo

The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2017-01-11T12:59:00Z
StorageLocationstringNo

The storage address of the media file.

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

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

Totalinteger

The total number of media files returned.

100
RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58****
VideoListarray<object>

The information about the audio or video files. Information about a maximum of 5,000 audio or video files can be returned.

object

The video snapshot URL.

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
Statusstring

The status of the audio or video file. 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.
  • checking: The video is being reviewed.
  • Blocked: The video is blocked.
  • Normal: The video is normal.
  • ProduceFail: The video failed to be produced.

For more information about each video status, see the "Status: the status of a video" section of the Basic data types topic.

Normal
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-11-14T09:15:50Z
CateIdlong

The category ID of the audio or video file.

781111
VideoIdstring

The ID of the audio or video file.

9ae2af636ca6c10412f44891fc****
Tagsstring

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

Tag 1,Tag 2
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-14T09:16:50Z
CateNamestring

The name of the category.

Category name
Descriptionstring

The description of the audio or video file.

Video description in ApsaraVideo VOD
AppIdstring

The ID of the application. Default value: app-1000000.

app-1000000
Sizelong

The size of the source file. Unit: bytes.

10897890
CoverURLstring

The thumbnail URL of the audio or video file.

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

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

135.6
Titlestring

The title of the audio or video file.

Video title in ApsaraVideo VOD
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****
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

{
  "Total": 100,
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "VideoList": {
    "Video": [
      {
        "StorageLocation": "out-****.oss-cn-shanghai.aliyuncs.com",
        "Status": "Normal",
        "CreationTime": "2017-11-14T09:15:50Z",
        "CateId": 781111,
        "VideoId": "9ae2af636ca6c10412f44891fc****",
        "Tags": "Tag 1,Tag 2\n",
        "ModificationTime": "2017-11-14T09:16:50Z",
        "CateName": "Category name\n",
        "Description": "Video description in ApsaraVideo VOD\n",
        "AppId": "app-1000000",
        "Size": 10897890,
        "CoverURL": "https://example.aliyundoc.com/****.jpg",
        "Duration": 135.6,
        "Title": "Video title in ApsaraVideo VOD\n",
        "Snapshots": {
          "Snapshot": [
            "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****"
          ]
        },
        "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 changedView Change Details

Common errors

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

Error codeError messageHTTP status codeDescription
VideoListExceededMaxThe video list exceeded maximum.400The error message returned because the total number of entries returned exceeds the upper limit.
InvalidVideo.NotFoundThe video does not exist.404The error message returned because the video does not exist.