tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Task Callback

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 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"
}
]
}


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan