Updated on 2026-06-25 GMT+08:00

Querying a Clipping Task

Function

Queries the execution status, creation, and end time of a clipping task.

Calling Method

For details, see Calling APIs.

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

    mpc:editingTask:view

    List

    -

    -

    -

    -

URI

GET /v2/{project_id}/editing/jobs

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

job_id

Yes

Array of strings

Task ID. Max. 10 at a time.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token

The token 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 when AK/SK-based authentication is used.

X-Project_Id

No

String

Project ID. This parameter is mandatory when AK/SK-based authentication is used. It is same as the project ID in path parameters.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

This field indicates the unique request identifier used for tracing task process. Format: request_id(uuid)-timestamp-hostname

Table 5 Response body parameters

Parameter

Type

Description

job_array

Array of QueryEditingJob objects

Tasks

Table 6 QueryEditingJob

Parameter

Type

Description

job_id

String

Task ID

status

String

Task execution status.

The options include:

  • WAITING: pending

  • PROCESSING: ongoing

  • SUCCEEDED: successful

  • FAILED: failed

progress

Integer

Indicates the task execution progress, in percentage. The value ranges from 0 to 100.

create_time

String

Editing task creation time. The format is yyyyMMddHHmmss. The value must be a timezone-agnostic UTC time.

start_time

String

Editing task start time. The format is yyyyMMddHHmmss. The value must be a timezone-agnostic UTC time.

end_time

String

Editing task end time. The format is yyyyMMddHHmmss. The value must be a timezone-agnostic UTC time.

metadata

Array of FileMetaData objects

Metadata of the output file.

output

ObsObjInfo object

Output address.

editing_output

EditingOutputFileInfo object

Meta information of the task output.

Table 7 FileMetaData

Parameter

Type

Description

name

String

Metadata name.

value

String

Metadata value.

Table 8 ObsObjInfo

Parameter

Type

Description

bucket

String

OBS bucket name

location

String

Region where an OBS bucket is located. It must be the same as the region where MPC is deployed.

object

String

OBS object path, which complies with the OSS Object definition.

  • If this parameter is used for an input, an object must be specified.

  • If this parameter is used for an output, only the directory where the output is to be stored needs to be specified.

A subtitle file name that contains special characters (such as [) will cause the transcoding task to fail.

  • Correct example: demo.srt

  • Incorrect example: [demo.srt

file_name

String

File name, which can contain a maximum of 180 characters.

  • If this parameter is specified, the output object name is object/file_name.

  • If this parameter is not specified, the output object name is object/xxx, where xxx is specified by MPC.

When it is used as an output file name:

  • This parameter is valid for container format conversion. The output file name must be specified.

  • If the output file name needs to be specified during transcoding, use the parameter output_filenames.

  • This parameter is valid for parsing. If a file name is specified during parsing, the parsing parameters are written to the specified file name and the file metadata is obtained by querying JSON data in the API response.

  • This parameter is invalid for snapshot capturing.

  • This parameter is invalid for conversion into animated GIFs.

  • When the output file is in HLS format, a file name containing index, such as index.m3u8, will cause playback failure.

Table 9 EditingOutputFileInfo

Parameter

Type

Description

duration

Long

Output file duration. Unit: second.

duration_ms

Long

Output duration, in milliseconds.

format

String

Output packaging format.

size

Long

Media file size, in KB

size_byte

Long

Media file size, in Byte

md5

String

MD5 value of the video.

NOTE:
This field is returned only by the transcoding and parsing APIs. By default, this field is disabled. You need to submit a service ticket to enable it.

video_info

EditingVideoInfo object

Video information

audio_info

Array of EditingAudioInfo objects

Audio information

Table 10 EditingVideoInfo

Parameter

Type

Description

width

Integer

Video width

height

Integer

Video height

bitrate

Integer

Video bitrate, in kbit/s

bitrate_bps

Long

Video bitrate, in bit/s

frame_rate

Integer

Output frame rate.

codec

String

Video encoding format

dynamic_range

String

Source dynamic range. The value can be HDR or SDR.

duration

String

Video stream duration, in seconds.

duration_ms

String

Video stream duration, in milliseconds

rotate

Float

Video shooting angle, in degrees.

Table 11 EditingAudioInfo

Parameter

Type

Description

codec

String

Audio encoding format

sample

Integer

Audio sampling rate

channels

Integer

Audio signaling channel

bitrate

Integer

Audio bitrate, in kbit/s

bitrate_bps

Long

Audio bitrate, in bit/s

duration

String

Audio stream duration, in seconds.

duration_ms

String

Audio stream duration, in milliseconds.

Status code: 400

Table 12 Response header parameters

Parameter

Type

Description

X-Request-Id

String

This field indicates the unique request identifier used for tracing task process. Format: request_id(uuid)-timestamp-hostname

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Status code: 500

Table 14 Response header parameters

Parameter

Type

Description

X-Request-Id

String

This field indicates the unique request identifier used for tracing task process. Format: request_id(uuid)-timestamp-hostname

Table 15 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

GET https://{endpoint}/v2/{project_id}/editing/jobs?job_id=30647

Example Responses

None

Status Codes

Status Code

Description

200

The clipping task has been queried.

400

Query the clipping task failed or request the parameter verification failed.

500

Internal server error.

Error Codes

See Error Codes.