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
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
CateId | long | No | The ID of the category. You can use one of the following methods to obtain the category ID:
| 781111 |
Status | string | No | The status of the video. You can specify multiple video statuses and separate them with commas (,). Valid values:
For more information about each video status, see the "Status: the status of a video" section of the Basic data types topic. | Uploading,Normal |
PageNo | integer | No | The number of the page to return. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Default value: 10. Maximum value: 100. | 10 |
SortBy | string | No | The sorting method of the results. Valid values:
| CreationTime:Asc |
StartTime | string | No | 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 |
EndTime | string | No | 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 |
StorageLocation | string | No | The storage address of the media file. | out-****.oss-cn-shanghai.aliyuncs.com |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 time | Summary of changes | Operation |
---|---|---|
2023-04-11 | The response structure of the API has changed | View Change Details |
Common errors
The following table describes the common errors that this operation can return.
Error code | Error message | HTTP status code | Description |
---|---|---|---|
VideoListExceededMax | The video list exceeded maximum. | 400 | The error message returned because the total number of entries returned exceeds the upper limit. |
InvalidVideo.NotFound | The video does not exist. | 404 | The error message returned because the video does not exist. |