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

Querying Media Asset Tasks

Function

##Typical Scenarios##

This API is used to query media asset task information.

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/{project_id}/asset/tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Task type.

asset_id

No

String

Media asset ID.

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.

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

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

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.

Table 5 Result

Parameter

Type

Description

type

String

Task type.

asset_id

String

Media asset ID.

status

String

Transcoding status.

  • WAITING

  • PROCESSING

  • SUCCEED

  • FAILED

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.

Table 6 TranscodeInfoResult

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

Table 7 Response body parameters

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.