Updated on 2026-01-16 GMT+08:00

Querying Media Assets

Function

This API is used to query media assets. Each record in the list contains the brief information of a media asset.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1.0/{project_id}/asset/list

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

asset_id

No

Array of strings

Media asset ID. A maximum of 10 media assets can be queried at a time.

status

No

Array of strings

Media asset status. Multiple statuses can be queried at a time.

The options include:

  • CREATING: The file is being uploaded.

  • FAILED: Upload failed.

  • CREATED: The file has been uploaded.

  • PUBLISHED: The media asset has been published.

  • TRANSCODING: The file is being transcoded.

  • TRANSCODE_SUCCEED: Transcoding succeeded.

  • TRANSCODE_FAILED: Transcoding failed.

  • THUMBNAILING: The thumbnail is being generated.

  • THUMBNAIL_SUCCEED: The thumbnail has been generated.

  • THUMBNAIL_FAILED: Thumbnail generation failed.

  • UN_REVIEW: The file has not been reviewed.

  • REVIEWING: The file is being reviewed.

  • REVIEW_SUSPICIOUS: The file failed the review and is to be manually reviewed.

  • REVIEW_PASSED: The file has been approved.

  • REVIEW_FAILED: The file failed the review.

  • REVIEW_BLOCKED: The file has been blocked.

start_time

No

String

Start time.

The format is yyyymmddhhmmss. The value must be a UTC time, without reference to any time zone.

end_time

No

String

End time.

The format is yyyymmddhhmmss. The value must be a UTC time, without reference to any time zone.

category_id

No

Integer

Category ID.

tags

No

String

Media asset tags. Each tag contains up to 24 characters and up to 16 tags are allowed. Use commas (,) to separate tags. All tags must be UTF-8 encoded.

query_string

No

String

String for fuzzy search in media asset titles and descriptions.

NOTE:
Fuzzy search is inefficient when the data volume is large. This field is not recommended when the number of media assets reaches millions.

media_type

No

Array of strings

Audio/Video file formats. Up to 20 formats can be queried.

The options include:

  • Video: MP4, TS, MOV, MXF, MPG, FLV, WMV, AVI, M4V, F4V, MPEG, and WebM

  • Audio: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2

page

No

Integer

Page number.

Default value: 0

size

No

Integer

Number of records on each page.

Value range: 1 to 100

Default value: 10

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when a request is sent. This parameter is mandatory for AK/SK authentication.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total number of media assets.

NOTE:
Currently, statistics about up to 20,000 media files can be collected. To query the total number of media files, submit a service ticket.

assets

Array of AssetSummary objects

Media asset list.

Table 5 AssetSummary

Parameter

Type

Description

asset_id

String

Media asset ID assigned by VOD. It can only be queried but cannot be modified.

title

String

Media asset title. The value is UTF-8 encoded and cannot exceed 128 characters.

description

String

Media asset description. The value contains a maximum of 1,024 characters.

duration

Integer

Media file duration.

Unit: seconds

duration_ms

Long

Video duration, in milliseconds.

size

Long

Media file size.

Unit: bytes

original_url

String

Original streaming URL.

category

String

Media asset category name.

covers

Array of CoverInfo objects

Thumbnail information.

create_time

String

Time when the media asset was created.

The format is yyyymmddhhmmss. The value must be a UTC time, without reference to any time zone.

asset_status

String

Media asset status.

The options include:

  • CREATING: The file is being uploaded.

  • FAILED: Upload failed.

  • CREATED: The file has been uploaded.

  • PUBLISHED: The media asset has been published.

  • DELETED: The deletion succeeded.

transcode_status

String

Transcoding status.

The options include:

  • UN_TRANSCODE: The file is not transcoded.

  • WAITING_TRANSCODE: The file is to be transcoded.

  • TRANSCODING: The file is being transcoded.

  • TRANSCODE_SUCCEED: Transcoding succeeded.

  • TRANSCODE_FAILED: Transcoding failed.

thumbnail_status

String

Snapshot status.

The options include:

  • UN_THUMBNAIL: No snapshot is captured.

  • THUMBNAILING: The snapshot is being captured.

  • THUMBNAIL_SUCCEED: The snapshot has been captured.

  • THUMBNAIL_FAILED: Snapshot capturing failed.

review_status

String

Content review status.

The options include:

  • UN_REVIEW: The file has not been reviewed.

  • REVIEWING: The file is being reviewed.

  • REVIEW_SUSPICIOUS: The file needs to be manually reviewed.

  • REVIEW_PASSED: The file has been approved.

  • REVIEW_FAILED: The file is not approved.

  • REVIEW_BLOCKED: The file has been blocked.

exec_desc

String

Execution description of media file tasks

Example:

  • asset_exec_desc: upload success: execution description of file upload tasks

  • transcode_exec_desc: transcode success: execution description of transcoding tasks

  • thumbnail_exec_desc: thumbnail failed: execution description of snapshot capturing tasks

  • review_exec_desc: review pass: execution description of review tasks

media_type

String

Audio/Video file format.

The options include:

  • Video: MP4, TS, MOV, MXF, MPG, FLV, WMV, AVI, M4V, F4V, MPEG, and WebM

  • Audio: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2

Table 6 CoverInfo

Parameter

Type

Description

cover_url

String

URL for downloading the thumbnail file.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

This example queries media assets.

GET https://{endpoint}/v1.0/{project_id}/asset/list

Example Responses

Status code: 200

Returned when the request succeeded.

{
  "total" : 1,
  "assets" : [ {
    "asset_id" : "67d1470893419bfcb9663103dd8a66ac",
    "title" : "video.mp4",
    "duration" : 60,
    "duration_ms" : 60000,
    "size" : 12881945,
    "category" : "Other",
    "covers" : [ {
      "cover_url" : "https://355.cdn-vod.huaweicloud.com/asset/67d1470893419bfcb9663103dd8a66ac/cover/Cover0.jpg"
    } ],
    "create_time" : "20190625020756",
    "asset_status" : "PUBLISHED",
    "transcode_status" : "TRANSCODE_SUCCEED",
    "thumbnail_status" : "UN_THUMBNAIL",
    "review_status" : "UN_REVIEW",
    "exec_desc" : "asset_exec_desc:Asset meta is\npublished;transcode_exec_desc:Transcode success;",
    "media_type" : "MP4"
  } ]
}

Status code: 400

Returned when the request failed.

{
  "error_code" : "VOD.10053",
  "error_msg" : "The request parameter is illegal, illegal field: {xx}."
}

Status Codes

Status Code

Description

200

Returned when the request succeeded.

400

Returned when the request failed.

Error Codes

See Error Codes.