All Products
Search
Document Center

Intelligent Media Services:GetVideoList

Last Updated:Dec 16, 2024

Queries information about video and audio files.

Operation description

You can call this operation to query information about up to the first 5,000 audio and video files based on the filter condition, such as the status or category ID of the file. We recommend that you set the StartTime and EndTime parameters to narrow down the time range and perform multiple queries to obtain data.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • 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 Key: the condition key that is defined by the cloud service.
  • 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.
OperationAccess levelResource typeCondition keyAssociated operation
ice:GetVideoList
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CateIdlongNo

The ID of the category.

781111
StatusstringNo

The status of the video. You can specify multiple video statuses and separate them with commas (,).

Valid values:

  • PrepareFail: The file is abnormal.
  • 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.
  • ProduceFail: The video failed to be produced.
  • Normal: The video is normal.
  • Uploading: The video is being uploaded.
  • Preparing: The file is being generated.
  • Blocked: The video is blocked.
  • checking: The video is being reviewed.
Uploading,Normal
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
SortBystringNo

The sorting method of the results. Valid values:

  • CreationTime:Desc (default): sorts results in reverse chronological order.
  • CreationTime:Asc: sorts results in chronological order.
CreationTime:Asc
PageNointegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 10. Maximum value: 50.

20

Response parameters

ParameterTypeDescriptionExample
object

The schema of the response.

RequestIdstring

The ID of the request.

******11-DB8D-4A9A-875B-275798******
Successstring

Indicates whether the request is successful. Valid values:

  • true
  • false
true
Codestring

The status code returned.

200
Totallong

The total number of audio and video files that meet the conditions.

163
MediaListarray<object>

The information about the audio and video files.

MediaListobject

The information about the audio or video file.

StorageLocationstring

The storage address.

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

The status of the video.

Valid values:

  • PrepareFail: The file is abnormal.
  • 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.
  • ProduceFail: The video failed to be produced.
  • Normal: The video is normal.
  • Uploading: The video is being uploaded.
  • Preparing: The file is being generated.
  • Blocked: The video is blocked.
  • checking: The video is being reviewed.
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 ID of the category.

3679
MediaIdstring

The ID of the audio or video file.

1c6ce34007d571ed94667630a6bc****
Tagsstring

The tags of the audio or video file.

ModificationTimestring

The time when the audio or video file 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.

Descriptionstring

The description of the audio or video file.

AppIdstring

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

app-1000000
Sizelong

The size of the source file. Unit: bytes.

10897890
CoverUrlstring

The URL of the thumbnail.

http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****
Durationfloat

The duration. Unit: seconds.

135.6
Titlestring

The title of the audio or video file.

Snapshotsarray

The array of video snapshot URLs.

Snapshotstring

The URL of the video snapshot.

http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Success": "true",
  "Code": "200",
  "Total": 163,
  "MediaList": [
    {
      "StorageLocation": "out-****.oss-cn-shanghai.aliyuncs.com",
      "Status": "Normal",
      "CreationTime": "2017-11-14T09:15:50Z",
      "CateId": 3679,
      "MediaId": "1c6ce34007d571ed94667630a6bc****",
      "Tags": "",
      "ModificationTime": "2017-11-14T09:16:50Z",
      "CateName": "",
      "Description": "",
      "AppId": "app-1000000",
      "Size": 10897890,
      "CoverUrl": "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****",
      "Duration": 135.6,
      "Title": "",
      "Snapshots": [
        "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****"
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history