All Products
Search
Document Center

Intelligent Media Services:ListPublicMediaBasicInfos

Last Updated:Dec 16, 2024

Queries a list of media assets in the public media library that meet the specified conditions. A maximum of 100 media assets can be returned.

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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
MediaTagIdstringNo

The media tag. All media assets that contain the specified media tag are returned. Valid values:

  • Sticker tags:

    • sticker-atmosphere
    • sticker-bubble
    • sticker-cute
    • sticker-daily
    • sticker-expression
    • sticker-gif
  • Background music (BGM) tags:

    • bgm-romantic
    • bgm-cuisine
    • bgm-chinese-style
    • bgm-upbeat
    • bgm-dynamic
    • bgm-relaxing
    • bgm-quirky
    • bgm-beauty
  • Background image (BGI) tags:

    • bgi-grad
    • bgi-solid
    • bgi-pic
ticker-atmosphere
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
PageNointegerNo

The page number. Default value: 1

1
PageSizeintegerNo

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

10
IncludeFileBasicInfobooleanNo

Specifies whether to return the basic information of the media asset.

true
BusinessTypestringNo

The business type of the media asset. Valid values:

  • sticker
  • bgm
  • bgi
sticker

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The total number of media assets that meet the specified conditions.

2
MediaInfosarray<object>

The media assets that meet the specified conditions.

MediaInfoobject
MediaIdstring

The ID of the media asset.

****019b82e24b37a1c2958dec38****
MediaBasicInfoobject

The basic information of the media asset.

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.

general
Sourcestring

The source of the media asset.

oss
Titlestring

The title of the media asset.

Descriptionstring

The description of the media asset.

description
Categorystring

The category of the media asset.

video
MediaTagsstring

The tags of the media asset.

sticker-daily
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.

null
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:04Z
DeletedTimestring

The time when the media asset was deleted.

2021-01-08T16:52:04Z
FileInfoListarray<object>

The file information of the media asset.

FileInfoobject
FileBasicInfoobject

The basic information of the file, such as 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.

338990717
FileUrlstring

The Object Storage Service (OSS) URL of the file.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.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.

10.040000
Bitratestring

The bitrate.

270112.12
Widthstring

The width.

1920
Heightstring

The height.

1080
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.

2

Examples

Sample success responses

JSONformat

{
  "RequestId": "******B7-7F87-4792-BFE9-63CD21******",
  "TotalCount": 2,
  "MediaInfos": [
    {
      "MediaId": "****019b82e24b37a1c2958dec38****",
      "MediaBasicInfo": {
        "MediaId": "****019b82e24b37a1c2958dec38****",
        "InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
        "MediaType": "video",
        "BusinessType": "general",
        "Source": "oss",
        "Title": "",
        "Description": "description",
        "Category": "video",
        "MediaTags": "sticker-daily",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
        "UserData": "userData",
        "Snapshots": "null",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2021-01-08T16:52:04Z",
        "ModifiedTime": "2021-01-08T16:52:04Z",
        "DeletedTime": "2021-01-08T16:52:04Z"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example.mp4",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "338990717",
            "FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
            "Region": "cn-shanghai",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "10.040000",
            "Bitrate": "270112.12",
            "Width": "1920",
            "Height": "1080"
          }
        }
      ]
    }
  ],
  "NextToken": "8EqYpQbZ6Eh7+Zz8DxVYoQ==",
  "MaxResults": 2
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-01-26The request parameters of the API has changedView Change Details