All Products
Search
Document Center

GetVideoList

Last Updated: Mar 04, 2019

Description

You can call this operation to obtain a video information list.

Note: You can obtain a maximum of 5,000 data records queried based on specified filter criteria (such as the time range). You can also set the StartTime and EndTime parameters multiple times to obtain data. For more information about how to list all data, see SearchMedia.

Request parameters

NameTypeRequiredDescription
ActionStringYesThe operation that you want to perform. Set the value to GetVideoList.
StatusStringNoThe video status.
Videos in all statuses are obtained by default. Separate multiple video statuses with a comma (,). For example, Uploading,Normal. Valid values:
  • Uploading
  • UploadSucc
  • Transcoding
  • TranscodeFail
  • Checking
  • Blocked
  • Normal
StartTimeStringNoThe start time of the creation time.
  • The value is an open interval, which indicates that the actual start time is later than the specified start time.
  • Specify a date in ISO 8601 format in UTC, that is, YYYY-MM-DDThh:mm:ssZ. [DO NOT TRANSLATE] For example, a value of 2017-01-11T12:00:00Z indicates 20:00:00 on January 11, 2017, Beijing time.
EndTimeStringNoThe end time of the creation time.
  • The value is a closed interval, which indicates that the actual end time is earlier than or the same as the specified end time.
  • Specify a date in ISO 8601 format in UTC, that is, YYYY-MM-DDThh:mm:ssZ. [DO NOT TRANSLATE] For example, a value of 2017-01-11T12:00:00Z indicates 20:00:00 on January 11, 2017, Beijing time.
CateIdLongNo The video category ID.
StorageLocationStringNoThe file storage location. For example, out-xxxxx-xxxxx.oss-cn-shanghai.aliyuncs.com.
PageNoLongNo The page number.
Default value: 1.
PageSizeLongNoThe number of data records per page. Maximum value: 100.
Default value: 10.
SortByStringNoThe sorting rule of results. Valid values:
  • CreationTime:Desc
  • CreationTime:Asc
Default value: CreationTime:Desc (indicating that results are sorted based on the creation time in descending order).

Response parameters

NameTypeDescription
RequestId StringThe GUID generated by Alibaba Cloud for the request.
VideoListVideo[]The video information list.
TotalNumberThe total number of videos.

Examples

Sample requests

  1. http://vod.cn-shanghai.aliyuncs.com/?Action=GetVideoList&Status=Normal&Format=JSON&<Common request parameters>

Note: For more information about common request parameters, see Common parameters.

Sample responses

JSON format

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "Total" : 100,
  4. "VideoList":{
  5. "Video" [
  6. {
  7. "VideoId": "93ab850b4f6f44eab54b6e91d24d81d4",
  8. "Title": "ApsaraVideo for VOD video title",
  9. "Description": "ApsaraVideo for VOD video description",
  10. "Duration": 135.6,
  11. "CoverURL": "https://image.example.com/coversample.jpg",
  12. "Status": "Normal",
  13. "CreationTime": "2017-06-26T05:38:48Z",
  14. "Size": 10897890,
  15. "Snapshots": {
  16. "Snapshot":[
  17. "http://image.example.com/snapshot/sample000001.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e273334f52",
  18. "http://image.example.com/snapshot/sample00002.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e272434f52",
  19. ...
  20. ]
  21. },
  22. "CateId": 78,
  23. "CateName": "Category name",
  24. "Tags": "Tag 1,Tag 2"
  25. "StorageLocation": "out-xxxxx-xxxxx.oss-cn-shanghai.aliyuncs.com"
  26. }
  27. ]
  28. }
  29. }

Error codes

The following table lists the error codes that this operation can return. For more information, see Error codes.

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