tencent cloud

Querying a Specified Task
Last updated: 2025-09-09 20:46:31
Querying a Specified Task
Last updated: 2025-09-09 20:46:31

Feature Description

Query the specified task.

Authorization Description

When using with a sub-account, the ci:DescribeMediaJob permission is required. For details, see Cloud Infinite action.

Activating a Service

To use this feature, you need to enable Cloud Infinite in advance and bind a bucket. For details, see Binding a Bucket.

Use Limits

When using this API, please first confirm the relevant restrictions. For details, see Usage Limits.


Request

Request sample

GET /jobs/<jobId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>

Note:
Authorization: Auth String. For details, see the Request Signature document.
jobId is the task id returned when submitting tasks, supports multiple entries separated by commas, with a maximum of 10 allowed.

Request header

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body

This request has no request body.

Response

Response Headers

This API only returns the public response header. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<JobsDetail>
</JobsDetail>
<NonExistJobIds></NonExistJobIds>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Container node Response content:
Node Name (Keyword)
Parent Node
Description
Type
JobsDetail
Response
Task detailed information
Container array
NonExistJobIds
Response
No task exists in the queried ID. Do not return when all tasks exist.
String
For different task types, the content of JobsDetail varies. Please refer to the following link:
Media Processing Service (MPS)
Video tag
Image Processing
Intelligent Voice
AI Content Recognition (CR)

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Examples

Request 1: Query an Audio and Video Transcoding Task That Is in Progress

GET /jobs/j8d121820f5e411ec926ef19d53ba9c6f HTTP/1.1
Accept: */*
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 666
Connection: keep-alive
Date: Mon, 28 Jun 2022 15:23:12 GMT
Server: tencent-ci
x-ci-request-id: NjMxMDJhYTNfMThhYTk0MGFfYmU1OV8zZjc=

<Response>
<JobsDetail>
<Code>Success</Code>
</Message>
<JobId>j8d121820f5e411ec926ef19d53ba9c6f</JobId>
<State>Running</State>
<Progress>30</Progress>
<CreationTime>2022-06-27T15:23:12+0800</CreationTime>
<StartTime>2022-06-27T15:23:13+0800</StartTime>
<EndTime>-</EndTime>
<QueueId>p2242ab62c7c94486915508540933a2c6</QueueId>
<Tag>Transcode</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/demo.mp4</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe22</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe23</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe24</WatermarkTemplateId>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<DigitalWatermark>
<Type>Text</Type>
<Message>123456789ab</Message>
<Version>V1</Version>
<IgnoreError>false</IgnoreError>
<State>Running</State>
</DigitalWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.mp4</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>

Request 2: Querying an Audio and Video Transcoding Task That Has Executed Successfully

GET /jobs/j9c0a4726f6ac11ec96aaa9b64ab18d00 HTTP/1.1
Accept: */*
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 666
Connection: keep-alive
Date: Mon, 28 Jun 2022 15:25:22 GMT
Server: tencent-ci
x-ci-request-id: NjMxMDJhYTNfMThhYTk0MGFfYmU1OV8zZjY=

<Response>
<JobsDetail>
<Code>Success</Code>
</Message>
<JobId>j9c0a4726f6ac11ec96aaa9b64ab18d00</JobId>
<State>Success</State>
<Progress>100</Progress>
<CreationTime>2022-06-27T15:23:12+0800</CreationTime>
<StartTime>2022-06-27T15:23:13+0800</StartTime>
<EndTime>2022-06-27T15:24:33+0800</EndTime>
<QueueId>p2242ab62c7c94486915508540933a2c6</QueueId>
<Tag>Transcode</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/demo.mp4</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe22</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe23</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe24</WatermarkTemplateId>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<DigitalWatermark>
<Type>Text</Type>
<Message>123456789ab</Message>
<Version>V1</Version>
<IgnoreError>false</IgnoreError>
<State>Running</State>
</DigitalWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.mp4</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
<MediaInfo>
<Format>
<Bitrate>834.736000</Bitrate>
<Duration>13.654000</Duration>
<FormatLongName>QuickTime / MOV</FormatLongName>
<FormatName>mov,mp4,m4a,3gp,3g2,mj2</FormatName>
<NumProgram>0</NumProgram>
<NumStream>2</NumStream>
<Size>1424687</Size>
<StartTime>0.000000</StartTime>
</Format>
<Stream>
<Audio>
<Bitrate>104.047000</Bitrate>
<Channel>2</Channel>
<ChannelLayout>stereo</ChannelLayout>
<CodecLongName>AAC (Advanced Audio Coding)</CodecLongName>
<CodecName>aac</CodecName>
<CodecTag>0x6134706d</CodecTag>
<CodecTagString>mp4a</CodecTagString>
<CodecTimeBase>1/44100</CodecTimeBase>
<Duration>13.653311</Duration>
<Index>1</Index>
<Language>und</Language>
<SampleFmt>fltp</SampleFmt>
<SampleRate>44100</SampleRate>
<StartTime>0.000000</StartTime>
<Timebase>1/44100</Timebase>
</Audio>
<Subtitle/>
<Video>
<AvgFps>25.000000</AvgFps>
<Bitrate>763.774000</Bitrate>
<CodecLongName>H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10</CodecLongName>
<CodecName>h264</CodecName>
<CodecTag>0x31637661</CodecTag>
<CodecTagString>avc1</CodecTagString>
<CodecTimeBase>1/12800</CodecTimeBase>
<ColorPrimaries>bt470bg</ColorPrimaries>
<ColorRange>tv</ColorRange>
<ColorTransfer>smpte170m</ColorTransfer>
<Duration>12.960000</Duration>
<Fps>25.000000</Fps>
<HasBFrame>0</HasBFrame>
<Height>960</Height>
<Index>0</Index>
<Language>und</Language>
<Level>10</Level>
<NumFrames>324</NumFrames>
<PixFormat>yuv420p</PixFormat>
<Profile>High</Profile>
<RefFrames>1</RefFrames>
<Rotation>0.000000</Rotation>
<StartTime>0.000000</StartTime>
<Timebase>1/12800</Timebase>
<Width>544</Width>
</Video>
</Stream>
</MediaInfo>
<MediaResult>
<OutputFile>
<Bucket>test-123456789</Bucket>
<Region>ap-chongqing</Region>
<ObjectName>output/out.mp4</ObjectName>
<Md5Info>
<Md5>3df1f845d2ffd20a525a93ec40014d90</Md5>
<ObjectName>output/out.mp4</ObjectName>
</Md5Info>
</OutputFile>
</MediaResult>
</Operation>
</JobsDetail>
</Response>

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback