Queries media assets
Function
Queries media assets. Each record in the list contains the brief information of a media asset.
URI
GET /v1.0/{project_id}/asset/list
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
asset_id |
No |
Array |
Media ID. A maximum of 10 media assets can be queried at a time. |
status |
No |
Array |
Media file status. Media files of different statuses are queried at a time. Possible values are:
|
start_time |
No |
String |
Start time The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
end_time |
No |
String |
End time The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
category_id |
No |
Integer |
Category ID |
tags |
No |
String |
Media asset tag. Each tag contains up to 16 characters and up to 16 tags are allowed. Use commas (,) to separate tags. The values are UTF-8-encoded. |
query_string |
No |
String |
String for fuzzy search in the media asset title, description, and category |
media_type |
No |
Array |
Format of the audio/video file. Files of up to 20 different formats can be queried. Possible values are:
|
page |
No |
Integer |
Page number Default value: 0 |
size |
No |
Integer |
Number of records on each page The value ranges from 1 to 100. Default value: 10 |
Request 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 a token. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory for AK/SK authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of media files > 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 |
Parameter |
Type |
Description |
---|---|---|
asset_id |
String |
Media asset ID assigned by VOD. This parameter can only be queried but cannot be modified. |
title |
String |
Media asset title. The value is UTF-8-encoded and contains a maximum of 128 characters. |
description |
String |
Media asset description. The value contains a maximum of 1024 characters. |
duration |
Integer |
Media file duration Unit: second |
size |
Long |
Media file size Unit: byte |
original_url |
String |
Original streaming URL |
category |
String |
Media asset category name |
covers |
Array of CoverInfo objects |
Cover information |
create_time |
String |
Time when the media file was created The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
asset_status |
String |
Media file status Possible values are:
|
transcode_status |
String |
Transcoding status Possible values are:
|
thumbnail_status |
String |
Snapshot status Possible values are:
|
review_status |
String |
Content review status Possible values are:
|
exec_desc |
String |
Execution description of media file tasks Example:
|
media_type |
String |
Audio/Video file format Possible values are:
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
Example Requests
Queries media files.
GET https://{endpoint}/v1.0/{project_id}/asset/list
Example Responses
Status code: 200
The information is returned when the request succeeds.
{ "total" : 1, "assets" : [ { "asset_id" : "67d1470893419bfcb9663103dd8a66ac", "title" : "video.mp4", "duration" : 60, "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
The information is returned when the request fails.
{ "error_code" : "VOD.10053", "error_msg" : "The request parameter is illegal, illegal field: {xx}." }
Status Codes
Status Code |
Description |
---|---|
200 |
The information is returned when the request succeeds. |
400 |
The information is returned when the request fails. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot