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

Querying a Media Asset

Function

This API is used to query details about a specified 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/details

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

Yes

String

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

categories

No

Array of strings

Type of the information to be queried.

If this parameter is left blank, all information types are queried.

If this parameter is specified, one or more information types can be queried at a time. The options are:

  • base_info: basic information of the media file

  • transcode_info: transcoding result

  • thumbnail_info: thumbnail capture result

  • review_info: review result

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

asset_id

String

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

base_info

BaseInfo object

Basic media file information.

transcode_info

TranscodeInfo object

Information about the transcoded file.

NOTE:
The information can be queried only after the transcoding succeeded, and is unavailable when the transcoding is not performed, is being performed, or failed.

thumbnail_info

ThumbnailInfo object

Snapshot information.

NOTE:
The information can be queried only after the snapshot capturing succeeded, and is unavailable when the snapshot capturing is not performed, is being performed, or failed.

review_info

ReviewInfo object

Review information array.

> The information can be queried only after the review succeeded, and is unavailable when the review is not performed, is being performed, or failed.
Table 5 BaseInfo

Parameter

Type

Description

title

String

Media asset title.

The value is UTF-8 encoded and contains a maximum of 128 characters.

video_name

String

Media asset file name.

description

String

Media asset description.

The value contains a maximum of 1,024 characters.

category_id

Long

Media asset category ID.

category_name

String

Media asset category name.

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.

last_modified

String

Time when the media asset was last modified.

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

video_type

String

Audio/Video file type.

The options include:

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

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

tags

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.

meta_data

MetaData object

Video metadata.

It is generated after video parsing, including the packaging format, size, resolution, bitrate, and frame rate.

video_url

String

URL for accessing the original video file.

sign_url

String

Temporary access URL of the original video file in OBS. A specific value is returned only when the API for querying a media asset is called.

cover_info_array

Array of CoverInfo objects

Thumbnail information.

subtitle_info

Array of SubtitleInfo objects

Subtitle information array.

source_path

File_addr object

Media asset storage parameters.

output_path

File_addr object

Media asset storage parameters.

Table 6 CoverInfo

Parameter

Type

Description

cover_url

String

URL for downloading the thumbnail file.

Table 7 SubtitleInfo

Parameter

Type

Description

url

String

URL for downloading the subtitle file.

id

Integer

Subtitle file ID.

type

String

Subtitle file format. Currently, only SRT and VTT are supported.

language

String

Subtitle file language.

Table 8 File_addr

Parameter

Type

Description

bucket

String

OBS bucket name.

location

String

Name of the region where the bucket is located. For example, the region name of CN North-Beijing4 is cn-north-4. The created bucket must be in the same region as VOD.

object

String

File storage path.

Table 9 TranscodeInfo

Parameter

Type

Description

template_group_name

String

Transcoding template group name.

output

Array of Output objects

Transcoding output array.

  • HLS or DASH: The array contains n + 1 members, where n indicates the number of transcoding output channels.

  • MP4: The array contains n members, where n indicates the number of transcoding output channels.

exec_desc

String

Execution description.

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.

Table 10 Output

Parameter

Type

Description

play_type

String

Protocol type.

The options include:

  • hls

  • dash

  • mp4

url

String

Streaming URL.

group_id

String

Transcoding group ID.

group_name

String

Transcoding group name.

encrypted

Integer

Whether the stream is encrypted.

The options include:

  • 0: not encrypted

  • 1: encrypted

quality

String

Definition.

The options include:

  • FLUENT: smooth

  • SD: standard definition (SD)

  • HD: high definition (HD)

  • FULL_HD: ultra-high-definition (UHD)

meta_data

MetaData object

Video metadata.

It is generated after video parsing, including the packaging format, size, resolution, bitrate, and frame rate.

Table 11 MetaData

Parameter

Type

Description

pack_type

String

Video packaging format.

The options include:

  • MP4

  • TS

  • MOV

  • MXF

  • MPG

  • FLV

  • WMV

  • MP3

  • WMA

  • APE

  • FLAC

  • AAC

  • AC3

  • MMF

  • AMR

  • M4A

  • M4R

  • OGG

  • WAV

  • WV

  • MP2

  • AVI

  • F4V

  • M4V

  • MPEG

  • HLS

  • DASH

codec

String

Video encoding format.

The options include:

  • MPEG-2

  • MPEG-4

  • H.264

  • H.265

  • WMV

  • Vorbis

  • AAC

  • AC-3

  • AMR

  • APE

  • FLAC

  • MP3

  • MP2

  • WMA

  • PCM

  • ADPCM

  • WavPack

NOTE:
If unknown is returned for codec, the current audio/video encoding format sent by the user cannot be parsed.

duration

Long

Audio duration, in seconds.

If the original video duration is not an integer, the value of this field is rounded down.

If the original video duration is shorter than 1 second, the value of this field is 1.

duration_ms

Long

Video duration, in milliseconds.

video_size

Long

Video file size.

Unit: bytes

width

Long

Video width, in pixels.

  • Possible values for H.264: a multiple of 2 between 32 and 3,840

  • Possible values for H.265: a multiple of 4 between 320 and 3,840

hight

Long

Video height, in pixels.

  • Possible values for H.264: a multiple of 2 between 32 and 2,160

  • Possible values for H.265: a multiple of 4 between 240 and 2,160

height

Long

Video height, in pixels.

bit_rate

Long

Average video bitrate.

frame_rate

Long

Frame rate, in frames per second (FPS).

quality

String

Definition.

The options include:

  • FULL_HD: ultra-high-definition (UHD)

  • HD: high definition (HD)

  • SD: standard definition (SD)

  • FLUENT: smooth

  • AD: adaptive

  • 2K

  • 4K

audio_channels

Integer

Number of audio channels.

Table 12 ThumbnailInfo

Parameter

Type

Description

sample

Array of ThumbnailRsp objects

Video snapshot information. Snapshots are captured by interval.

dots

Array of ThumbnailRsp objects

Video snapshot information. Snapshots are captured by time point.

quantity

Array of ThumbnailRsp objects

Video snapshot information. Frequency is set to Specified quantity.

exec_desc

String

Execution description.

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.

Table 13 ThumbnailRsp

Parameter

Type

Description

offset

Integer

Time offset of the snapshot in the video, in seconds.

url

String

URL for accessing the snapshot.

Table 14 ReviewInfo

Parameter

Type

Description

suggestion

String

Whether the file is approved.

The options include:

  • block: The file contains sensitive information and fails the check.

  • pass: The file does not contain sensitive information and is approved.

  • review: A manual review is required.

NOTE:
When multiple scenarios are reviewed at the same time, the value of suggestion is subject to the scenario where sensitive information is most likely to occur. That is, if the value of at least one scenario is block, the value of suggestion is block. If the values of all scenarios are pass, the value of suggestion is pass. If a scenario needs to be reviewed, the value of suggestion is review.

text

TextReviewRet object

Text review result.

cover

Array of PictureReviewRet objects

Thumbnail review result.

video

Array of PictureReviewRet objects

Video review result.

exec_desc

String

Execution description.

review_status

String

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.

Table 15 TextReviewRet

Parameter

Type

Description

suggestion

String

Whether the file is approved.

The options include:

  • block: Sensitive information is contained, and the check is not passed.

  • pass: The file does not contain sensitive information and is approved.

  • review: A manual review is required.

politics

String

List of politically sensitive words.

porn

String

List of pornographic words.

abuse

String

List of abusive words.

Table 16 PictureReviewRet

Parameter

Type

Description

suggestion

String

Whether the file is approved.

The options include:

  • block: Sensitive information is contained, and the check is not passed.

  • pass: The file does not contain sensitive information and is approved.

  • review: A manual review is required.

offset

Integer

Time offset of the snapshot in the video. This field is not involved in the thumbnail.

Unit: seconds

url

String

URL for accessing the snapshot or thumbnail.

politics

Array of ReviewDetail objects

Review result of potential politically sensitive information.

terrorism

Array of ReviewDetail objects

Review result of potential terrorism-related information.

porn

Array of ReviewDetail objects

Review result of potential pornographic information.

Table 17 ReviewDetail

Parameter

Type

Description

confidence

String

Confidence score.

Value range: [0, 1]

label

String

Label of each review result.

  • politics: The label indicates the information about a political figure.

  • terrorism: The label indicates the terrorism-related information, such as guns, knives, and fire.

  • porn: The label indicates the pornographic information.

Status code: 400

Table 18 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

This example queries the details about a specified media asset.

GET https://{endpoint}/v1.0/{project_id}/asset/details?asset_id={asset_id}

Example Responses

Status code: 200

Returned when the request succeeded.

{
  "asset_id" : "41cff636d5b12a51e7eb2838bbf45201",
  "base_info" : {
    "title" : "Avatar",
    "video_name" : "Video on Demand (VOD).mp4",
    "description" : "Avatar, marketed as James Cameron's Avatar, is a 2009 American\nepic science fiction film directed, written, produced, and\nco-edited by James Cameron",
    "category_id" : -1,
    "category_name" : "Other",
    "create_time" : "20190612032250",
    "last_modified" : "20190613075030",
    "video_type" : "MP4",
    "tags" : "test1,test2",
    "meta_data" : {
      "pack_type" : null,
      "codec" : "H.264",
      "duration" : 131,
      "duration_ms" : 131000,
      "video_size" : 4942645,
      "width" : 1280,
      "hight" : 720,
      "height" : 720,
      "bit_rate" : 173,
      "frame_rate" : 30
    },
    "video_url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/5597e59de70722eaeb9b18c274e249b2.mp4",
    "sign_url" : "https://vod-bucket-57-cn-north-4.obs.cn-north-4.myhuaweicloud.com:443/05ab5cef408026f22f62c018de60cf2e/41cff636d5b12a51e7eb2838bbf45201 /5597e59de70722eaeb9b18c274e249b2.mp4?AWSAccessKeyId=CBN2J**********0RCSN&Expires=1652499973&Signature=kZYh0hEos2V**********AHGyXA%3D",
    "cover_info_array" : [ {
      "cover_url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/cover/Cover0.jpg"
    } ]
  },
  "transcode_info" : {
    "template_group_name" : "system_template_group",
    "output" : [ {
      "play_type" : "HLS",
      "url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/play_video/index.m3u8",
      "encrypted" : 0,
      "meta_data" : {
        "pack_type" : null,
        "codec" : "H.264",
        "duration" : 0,
        "duration_ms" : 0,
        "video_size" : 0,
        "width" : 0,
        "hight" : 0,
        "height" : 0,
        "bit_rate" : 0,
        "frame_rate" : 0
      }
    }, {
      "play_type" : "HLS",
      "url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/play_video/Video on Demand\n\n(VOD)_1_854X480_600_0.m3u8",
      "encrypted" : 0,
      "quality" : "SD",
      "meta_data" : {
        "pack_type" : null,
        "codec" : "H.264",
        "duration" : 130,
        "duration_ms" : 130000,
        "video_size" : 7976960,
        "width" : 854,
        "hight" : 480,
        "height" : 480,
        "bit_rate" : 421,
        "frame_rate" : 30000,
        "quality" : "SD"
      }
    }, {
      "play_type" : "DASH",
      "url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/play_video/index.mpd",
      "encrypted" : 0,
      "meta_data" : {
        "pack_type" : null,
        "codec" : "H.264",
        "duration" : 0,
        "duration_ms" : 0,
        "video_size" : 0,
        "width" : 0,
        "hight" : 0,
        "height" : 0,
        "bit_rate" : 0,
        "frame_rate" : 0
      }
    }, {
      "play_type" : "DASH",
      "encrypted" : 0,
      "quality" : "SD",
      "meta_data" : {
        "pack_type" : null,
        "codec" : "H.264",
        "duration" : 130,
        "duration_ms" : 130000,
        "video_size" : 7976960,
        "width" : 854,
        "hight" : 480,
        "height" : 480,
        "bit_rate" : 421,
        "frame_rate" : 30000,
        "quality" : "SD"
      }
    } ],
    "exec_desc" : "Transcode success",
    "transcode_status" : "TRANSCODE_SUCCEED"
  }
}

Status code: 400

Returned when the request failed.

{
  "error_code" : "VOD.10062",
  "error_msg" : "Media asset or resource does not exist, please check."
}

Status Codes

Status Code

Description

200

Returned when the request succeeded.

400

Returned when the request failed.

Error Codes

See Error Codes.