All Products
Search
Document Center

Intelligent Media Services:ListMediaBasicInfos

Last Updated:Dec 16, 2024

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

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:ListMediaBasicInfos
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StartTimestringNo

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
EndTimestringNo

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
MediaTypestringNo

The type of the media asset. Valid values:

- image

- video

- audio

- text

video
BusinessTypestringNo

The business type of the media asset. Valid values:

- subtitles

- watermark

- opening

- ending

- general

opening
SourcestringNo

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
StatusstringNo

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
NextTokenstringNo

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==
MaxResultsintegerNo

The maximum number of entries to return.

Maximum value: 100. Default value: 10.

5
SortBystringNo

The order of sorting by utcCreated. Default value: desc. Valid values:

- desc

- asc

desc
IncludeFileBasicInfobooleanNo

Specifies whether to return the basic information of the source file.

true
MediaIdstringNo

The ID of the media asset.

****019b82e24b37a1c2958dec38****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

******B7-7F87-4792-BFE9-63CD21******
TotalCountlong

The total number of entries returned.

4
MediaInfosarray<object>

The media assets that meet the specified conditions.

MediaInfoobject
MediaIdstring

The ID of the media asset.

****019b82e24b37a1c2958dec38****
MediaBasicInfoobject

BasicInfo

MediaIdstring

The ID of the media asset.

****019b82e24b37a1c2958dec38****
InputURLstring

The URL of the media asset in another service.

https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4
MediaTypestring

The type of the media asset.

video
BusinessTypestring

The business type of the media asset.

opening
Sourcestring

The source of the media asset.

oss
Titlestring

The title of the media asset.

Descriptionstring

The description of the media asset.

Categorystring

The category of the media asset.

MediaTagsstring

The tags of the media asset.

tags,tags2
CoverURLstring

The thumbnail URL of the media asset.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
UserDatastring

The user data.

userData
Snapshotsstring

The snapshots of the media asset.

[{"bucket":"example-bucket","count":"3","iceJobId":"******f48f0e4154976b2b8c45******","location":"oss-cn-beijing","snapshotRegular":"example.jpg","templateId":"******e6a6440b29eb60bd7c******"}]
Statusstring

The status of the media asset.

Normal
TranscodeStatusstring

The transcoding status of the media asset.

Init
CreateTimestring

The time when the media asset was created.

2021-01-08T16:52:04Z
ModifiedTimestring

The time when the media asset was last modified.

2021-01-08T16:52:07Z
DeletedTimestring

The time when the media asset was deleted.

2021-01-08T16:52:07Z
SpriteImagesstring

The sprite.

[{"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"}]
CateIdlong

The category ID.

3049
Bizstring

The service to which the media asset belongs.

ICE
UploadSourcestring

The upload source of the media asset.

general
ReferenceIdstring

The custom ID of the media asset. The ID is a string that contains 6 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are supported. The ID is unique among users.

123-123
FileInfoListarray<object>

FileInfos

FileInfoobject
FileBasicInfoobject

The basic information of the file, including the duration and size.

FileNamestring

The file name.

example.mp4
FileStatusstring

The file status.

Normal
FileTypestring

The file type.

source_file
FileSizestring

The file size. Unit: bytes.

14340962
FileUrlstring

The OSS URL of the file.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example2.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
Regionstring

The region in which the file resides.

cn-shanghai
FormatNamestring

The container format.

mov,mp4,m4a,3gp,3g2,mj2
Durationstring

The duration.

60.00000
Bitratestring

The bitrate.

1912.13
Widthstring

The width.

1280
Heightstring

The height.

720
CreateTimestring

The time when the file was created.

2021-01-08T16:52:04Z
ModifiedTimestring

The time when the file was last modified.

2021-01-08T16:52:07Z
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.

8EqYpQbZ6Eh7+Zz8DxVYoQ==
MaxResultsinteger

The maximum number of entries returned in the query.

2

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2021-03-31The response structure of the API has changedView Change Details