Querying Media Asset Tasks
Function
This API is used to query media asset tasks.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
vod:asset:getTaskInfo
List
assets *
-
-
-
URI
GET /v1/{project_id}/asset/tasks
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
No |
String |
Task type. TRANSCODE and THUMBNAIL are supported. |
|
asset_id |
No |
String |
Media asset ID. |
|
task_id |
No |
String |
Task ID. This parameter is valid only for querying snapshot tasks. |
|
create_time_after |
No |
String |
Matches tasks created after the specified time (including the time point). The time is in RFC 3339 format (UTC time), for example, 2020-09-01T18:50:20Z. |
|
create_time_before |
No |
String |
Matches tasks created before the specified time (excluding the time point). The time is in RFC 3339 format (UTC time), for example, 2020-09-01T18:50:20Z. |
|
end_time_after |
No |
String |
Matches tasks completed after the specified time (including the time point). The time is in RFC 3339 format (UTC time), for example, 2020-09-01T18:50:20Z. |
|
end_time_before |
No |
String |
Matches tasks completed before the specified time (excluding the time point). The value is a UTC time in RFC 3339 format, for example, 2020-09-01T18:50:20Z. |
|
status |
No |
Array of strings |
Task status. If this parameter is left blank, tasks in all statuses are queried by default. |
|
marker |
No |
String |
Marker. If this parameter is not transferred, the query will start from the first record by default. |
|
limit |
No |
Integer |
Number of records returned on each page. The default value is 10, the maximum value is 100, and the minimum value is 1. |
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 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
|
Parameter |
Type |
Description |
|---|---|---|
|
results |
Array of Result objects |
Result list. |
|
count |
Long |
Total number of items that meet the search criteria. |
|
next_marker |
String |
Marker for the next query. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Task type. |
|
asset_id |
String |
Media asset ID. |
|
status |
String |
Transcoding status. |
|
create_time |
String |
Time when the transcoding task is delivered. The value is a UTC time in RFC 3339 format. |
|
end_time |
String |
Time when transcoding ends. |
|
transcode_result |
TranscodeInfoResult object |
Transcoding information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
template_name |
String |
Transcoding template name. |
|
progress |
Integer |
Transcoding progress. |
|
start_time |
String |
Transcoding start time. The value is a UTC time in RFC3339 format, for example, 2020-09-01T18:50:20Z. |
|
waiting_time |
Integer |
Waiting duration, in seconds. This field is valid only when the value is not -1. |
|
process_time |
Integer |
Processing duration, in seconds. This field is valid only when the value is not -1. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
This example queries media asset tasks.
GET https://{endpoint}/v1/{project_id}/asset/tasks
Example Responses
Status code: 200
Returned when the request succeeded.
{
"results" : [ {
"asset_id" : "367a205a73a73e0cecd716ae92a94578",
"status" : "SUCCEED",
"create_time" : "2025-10-31T10:24:55Z",
"end_time" : "2025-10-31T10:26:34Z",
"transcode_result" : {
"template_name" : "test",
"progress" : 100,
"start_time" : "2025-10-31T10:25:34Z",
"waiting_time" : 39,
"process_time" : 60
}
} ],
"count" : 56,
"next_marker" : "82364735"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Returned when the request succeeded. |
|
400 |
Returned when the request failed. |
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