Queries the basic information of all media assets that meet the specified conditions.
Operation description
If includeFileBasicInfo is set to true, the basic information, such as the duration and file size, of the source file is also returned. At most the first 100 entries that meet the specified conditions are returned. All media assets must exactly match all non-empty fields. The fields that support exact match include MediaType, Source, BusinessType, Category, and Status. If all information cannot be returned at a time, you can use NextToken to initiate a request to retrieve a new page of results.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ice:ListMediaBasicInfos | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
StartTime | string | No | The start time of utcCreated. - The value is the beginning of a left-open right-closed interval. - Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. For example, 2017-01-11T12:00:00Z indicates 20:00:00 on January 11, 2017 (UTC +8). | 2020-12-20T12:00:00Z |
EndTime | string | No | The end time of utcCreated. - The value is the end of the left-open right-closed interval. - Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. For example, 2017-01-11T12:00:00Z indicates 20:00:00 on January 11, 2017 (UTC +8). | 2020-12-20T13:00:00Z |
MediaType | string | No | The type of the media asset. Valid values: - image - video - audio - text | video |
BusinessType | string | No | The business type of the media asset. Valid values: - subtitles - watermark - opening - ending - general | opening |
Source | string | No | The source of the media asset. Valid values: - oss: Object Storage Service (OSS). - vod: ApsaraVideo VOD. - live: ApsaraVideo Live. - general: other sources. This is the default value. | oss |
Status | string | No | The status of the media asset. Valid values: - Init: the initial state, which indicates that the source file is not ready. - Preparing: The source file is being prepared. For example, the file is being uploaded or edited. - PrepareFail: The source file failed to be prepared. For example, the information of the source file failed to be obtained. - Normal: The source file is ready. | Normal |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. | pSa1SQ0wCe5pzVrQ6mWZEw== |
MaxResults | integer | No | The maximum number of entries to return. Maximum value: 100. Default value: 10. | 5 |
SortBy | string | No | The order of sorting by utcCreated. Default value: desc. Valid values: - desc - asc | desc |
IncludeFileBasicInfo | boolean | No | Specifies whether to return the basic information of the source file. | true |
MediaId | string | No | The ID of the media asset. | ****019b82e24b37a1c2958dec38**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "******B7-7F87-4792-BFE9-63CD21******",
"TotalCount": 4,
"MediaInfos": [
{
"MediaId": "****019b82e24b37a1c2958dec38****",
"MediaBasicInfo": {
"MediaId": "****019b82e24b37a1c2958dec38****",
"InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
"MediaType": "video",
"BusinessType": "opening",
"Source": "oss",
"Title": "",
"Description": "",
"Category": "",
"MediaTags": "tags,tags2",
"CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
"UserData": "userData",
"Snapshots": "[{\"bucket\":\"example-bucket\",\"count\":\"3\",\"iceJobId\":\"******f48f0e4154976b2b8c45******\",\"location\":\"oss-cn-beijing\",\"snapshotRegular\":\"example.jpg\",\"templateId\":\"******e6a6440b29eb60bd7c******\"}]",
"Status": "Normal",
"TranscodeStatus": "Init",
"CreateTime": "2021-01-08T16:52:04Z",
"ModifiedTime": "2021-01-08T16:52:07Z",
"DeletedTime": "2021-01-08T16:52:07Z",
"SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]",
"CateId": 3049,
"Biz": "ICE",
"UploadSource": "general",
"ReferenceId": "123-123"
},
"FileInfoList": [
{
"FileBasicInfo": {
"FileName": "example.mp4",
"FileStatus": "Normal",
"FileType": "source_file",
"FileSize": "14340962",
"FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example2.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
"Region": "cn-shanghai",
"FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
"Duration": "60.00000",
"Bitrate": "1912.13",
"Width": "1280",
"Height": "720",
"CreateTime": "2021-01-08T16:52:04Z",
"ModifiedTime": "2021-01-08T16:52:07Z"
}
}
]
}
],
"NextToken": "8EqYpQbZ6Eh7+Zz8DxVYoQ==",
"MaxResults": 2
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2021-03-31 | The response structure of the API has changed | View Change Details |