tencent cloud

Cloud Infinite

Task Callback

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-12-25 15:13:51

Feature Overview

Cloud Infinite supports custom configuration of callback URLs. After a task is completed, the system sends an HTTP POST request to this URL with the notification content in the request body. By configuring the callback address, you can promptly learn the progress and status of task processing to perform other business operations.

Callback Content

After the task is completed, the system will send callback content to the configured callback address. The content containing complete node data is shown as follows:
<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2023-05-24T11:12:44+0800</CreationTime>
<EndTime>2023-05-24T11:12:45+0800</EndTime>
<Input>
<BucketId>test-1253960000</BucketId>
<Object>test.png</Object>
<Region>ap-chongqing</Region>
</Input>
<JobId>cda071f3af9e011ed8f900133752da9af</JobId>
<Message/>
<Operation>
<ImageInspectResult>
<Code>Success</Code>
<InputObjectName>test.png</InputObjectName>
<InputObjectUrl>https://.cos.ap-chongqing.myqcloud.com/test.png</InputObjectUrl>
<Message/>
<ProcessResult>
<PicSize>304491</PicSize>
<PicType>png</PicType>
<Suspicious>true</Suspicious>
<SuspiciousBeginByte>119</SuspiciousBeginByte>
<SuspiciousEndByte>304490</SuspiciousEndByte>
<SuspiciousSize>304372</SuspiciousSize>
<SuspiciousType>MPEG-TS</SuspiciousType>
<AutoProcessResult>
<Code>Success</Code>
<Message>Success</Message>
</AutoProcessResult>
</ProcessResult>
<State>Success</State>
</ImageInspectResult>
<JobLevel>0</JobLevel>
</Operation>
<QueueId>p3a3b198088e74b76b31d553a77b656be</QueueId>
<StartTime>2023-05-24T11:12:45+0800</StartTime>
<State>Success</State>
<Tag>ImageInspect</Tag>
</JobsDetail>
</Response>
The specific content of data is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Content of the Container Node Response:
Node Name (Keyword)
Parent Node
Description
Type
EventName
Response
Fixed value is TaskFinish.
String
JobsDetail
Response
Same as the Response.JobsDetail in the interface for submitting tasks for detecting abnormal images.
Container array
If the task is triggered by a workflow, Response.JobsDetail.Input will also include the CosHeaders node, which is an array of Container.

Content of the Container Node CosHeaders:
Node Name (Keyword)
Parent Node
Description
Type
Key
Response.JobsDetail.Input.CosHeaders
name of the custom Header
String
Value
Response.JobsDetail.Input.CosHeaders
custom Header value
String
If the task is triggered by a workflow, Response.JobsDetail will also include the Workflow node, which is of type Container.

Content of the Container Node Workflow:
Node Name (Keyword)
Parent Node
Description
Type
RunId
Response.Workflow
ID of the workflow instance
String
WorkflowId
Response.Workflow
workflow ID
String
WorkflowName
Response.Workflow
workflow name
String
Name
Response.Workflow
name of the workflow node
String

Practical Case

Case 1: Task Callback Triggered via Task API

<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2023-05-24T11:12:44+0800</CreationTime>
<EndTime>2023-05-24T11:12:45+0800</EndTime>
<Input>
<BucketId>test-1253960000</BucketId>
<Object>test.png</Object>
<Region>ap-chongqing</Region>
</Input>
<JobId>cda071f3af9e011ed8f900133752da9af</JobId>
<Message/>
<Operation>
<ImageInspectResult>
<Code>Success</Code>
<InputObjectName>test.png</InputObjectName>
<InputObjectUrl>https://test-1253960000.cos.ap-chongqing.myqcloud.com/test.png</InputObjectUrl>
<Message/>
<ProcessResult>
<PicSize>304491</PicSize>
<PicType>png</PicType>
<Suspicious>true</Suspicious>
<SuspiciousBeginByte>119</SuspiciousBeginByte>
<SuspiciousEndByte>304490</SuspiciousEndByte>
<SuspiciousSize>304372</SuspiciousSize>
<SuspiciousType>MPEG-TS</SuspiciousType>
<AutoProcessResult>
<Code>Success</Code>
<Message>Success</Message>
</AutoProcessResult>
</ProcessResult>
<State>Success</State>
</ImageInspectResult>
<JobLevel>0</JobLevel>
</Operation>
<QueueId>p3a3b198088e74b76b31d553a77b656be</QueueId>
<StartTime>2023-05-24T11:12:45+0800</StartTime>
<State>Success</State>
<Tag>ImageInspect</Tag>
</JobsDetail>
</Response>

Case 2: Task Callback Triggered by the Task Interface, with the Format Being JSON

{
"EventName": "TaskFinish",
"JobsDetail": [
{
"Code": "Success",
"CreationTime": "2023-05-24T14:24:07+0800",
"EndTime": "2023-05-24T14:24:08+0800",
"Input": {
"BucketId": "testpic-1253960000",
"Object": "test.png",
"Region": "ap-chongqing"
},
"JobId": "c966a67d0f9fb11eda05029775a03955f",
"Message": "",
"Operation": {
"ImageInspectResult": [
{
"Code": "Success",
"InputObjectName": "test.png",
"InputObjectUrl": "https://testpic-1253960000.cos.ap-chongqing.myqcloud.com/test.png",
"Message": "",
"ProcessResult": {
"PicSize": 304491,
"PicType": "png",
"Suspicious": true,
"SuspiciousBeginByte": 119,
"SuspiciousEndByte": 304490,
"SuspiciousSize": 304372,
"SuspiciousType": "MPEG-TS"
},
"State": "Success"
}
],
"JobLevel": "0",
},
"QueueId": "p3a3b198088e74b76b31d553a77b656be",
"StartTime": "2023-05-24T14:24:08+0800",
"State": "Success",
"Tag": "ImageInspect"
}
]
}


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック