ListMediaBasicInfos

Updated at:

Queries the basic information of all media assets that match the specified parameters.

Operation description

  • If the includeFileBasicInfo field is set to true, the basic information of the source file, such as the duration and file size, is also returned.

  • A maximum of 100 matching records are returned.

  • All matching media assets must exactly match all non-empty fields. The fields that support exact match include the media type, source, business type, category, and resource status of the media asset.

  • If all information cannot be returned at a time, you can use nextToken to query the next page.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:ListMediaBasicInfos

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

StartTime

string

No

The start time of the creation time (utcCreated).

  • The interval is open, which means the 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. 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 the creation time (utcCreated).

  • The interval is closed, which means the time must be earlier than or equal to the end time.

  • Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. 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 media type of the media asset. Valid values:

  • "image": Image.

  • "video": Video.

  • "audio": Audio.

  • "text": Text.

video

BusinessType

string

No

The business type of the media asset. Valid values:

  • "subtitles": Subtitles.

  • "watermark": Watermark.

  • "opening": Opening.

  • "ending": Ending.

  • "general": General.

opening

Source

string

No

The source. Valid values:

  • "oss": OSS storage.

  • "vod": VOD.

  • "live": ApsaraVideo Live.

  • "general": Other sources (default).

oss

Status

string

No

The resource status. Valid values:

  • Init: Initial state. The source file is not ready.

  • Preparing: The source file is being prepared, such as being uploaded or edited and produced.

  • PrepareFail: The source file fails to be prepared, such as failing to obtain the source file information.

  • Normal: Normal. The source file is ready.

Normal

NextToken

string

No

The token that indicates the position from which the current call starts to read. An empty value indicates that all data has been read.

pSa1SQ0wCe5pzVrQ6mWZEw==

MaxResults

integer

No

The maximum number of records to return for the current request.

Maximum value: 100. Default value: 10.

5

SortBy

string

No

The sort order based on utcCreated. Default value: desc. Valid values:

  • "desc": Descending order.

  • "asc": Ascending order.

desc

IncludeFileBasicInfo

boolean

No

Specifies whether to include the basic information of the file in the response.

true

MediaId

string

No

The ID of the media asset. A single media asset ID supports prefix matching.

****019b82e24b37a1c2958dec38****

AuthTimeout

integer

No

The authentication expiration time. Unit: seconds.

  • Minimum value: 1.

  • Maximum value: 86400.

  • Default value: 3600.

30

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

TotalCount

integer

The total number of items that meet the request conditions.

4

MediaInfos

array<object>

The collection of media assets that meet the request conditions.

array<object>

The media asset information.

MediaId

string

The ID of the media asset. A single media asset ID supports prefix matching.

****019b82e24b37a1c2958dec38****

MediaBasicInfo

object

The basic information of the media asset.

MediaId

string

The ID of the media asset. A single media asset ID supports prefix matching.

****019b82e24b37a1c2958dec38****

InputURL

string

The URL of the media asset to be registered in the corresponding system.

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

MediaType

string

The media type of the media asset.

video

BusinessType

string

The business type of the media asset.

opening

Source

string

The source.

oss

Title

string

The title.

Title

Description

string

The content description.

Description

Category

string

The category.

Category

MediaTags

string

The tags.

tags,tags2

CoverURL

string

The cover URL.

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

UserData

string

The user data.

userData

Snapshots

string

The snapshots.

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

Status

string

The resource status.

Normal

TranscodeStatus

string

The transcoding status.

Init

CreateTime

string

The time when the media asset was created. The time follows the ISO 8601 standard and is in UTC.

2021-01-08T16:52:04Z

ModifiedTime

string

The time when the media asset was modified. The time follows the ISO 8601 standard and is in UTC.

2021-01-08T16:52:07Z

DeletedTime

string

The time when the media asset was deleted. The time follows the ISO 8601 standard and is in UTC.

2021-01-08T16:52:07Z

SpriteImages

string

The sprite images.

[{"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

integer

The category ID.

3049

Biz

string

The business to which the media asset belongs.

ICE

UploadSource

string

The upload source of the media asset.

general

ReferenceId

string

The custom ID. It must be 6 to 64 characters in length and can contain only lowercase letters, uppercase letters, digits, hyphens, and underscores. It must be unique per user.

123-123

FileInfoList

array<object>

The list of file information.

array<object>

The file information.

FileBasicInfo

object

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

FileName

string

The file name.

example.mp4

FileStatus

string

The file status.

Normal

FileType

string

The file type.

source_file

FileSize

string

The file size in bytes.

14340962

FileUrl

string

The OSS URL of the file.

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

Region

string

The storage region of the file.

cn-shanghai

FormatName

string

The container format.

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

Duration

string

The duration.

60.00000

Bitrate

string

The bitrate.

1912.13

Width

string

The width.

1280

Height

string

The height.

720

CreateTime

string

The time when the file was created. The time follows the ISO 8601 standard and is in UTC.

2021-01-08T16:52:04Z

ModifiedTime

string

The time when the file was modified. The time follows the ISO 8601 standard and is in UTC.

2021-01-08T16:52:07Z

NextToken

string

The token that indicates the position from which the current call starts to read. An empty value indicates that all data has been read.

8EqYpQbZ6Eh7+Zz8DxVYoQ==

MaxResults

integer

The maximum number of entries returned for the current request.

2

Examples

Success response

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": "Title",
        "Description": "Description",
        "Category": "Category",
        "MediaTags": "tags,tags2",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
        "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=&OSSAccessKeyId=&Signature=&security-token=",
            "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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.