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
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-09-09 20:02:19

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. You can use the callback URL to learn about the task processing progress and status in a timely manner for other business operations.

Callback Content

After task completion, the system will send callback content to your configured callback address. The following shows the complete content of the node data:
<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2023-11-25T08:47:39+0800</CreationTime>
<EndTime>2023-11-25T08:47:40+0800</EndTime>
<Input>
<BucketId>test-1234567890</BucketId>
<Object>pic/ocr1.png</Object>
<Region>ap-chongqing</Region>
</Input>
<JobId>a3c193f288b2c11eeb60f39de2f86f409</JobId>
<Message/>
<Operation>
<Detection>
<Angel>0</Angel>
<Language/>
<PdfPageSize>0</PdfPageSize>
<TextDetections>
<Confidence>98</Confidence>
<DetectedText>Plow the fields at noon</DetectedText>
<ItemPolygon>
<Height>35</Height>
<Width>176</Width>
<X>40</X>
<Y>24</Y>
</ItemPolygon>
<Polygon>
<X>40</X>
<Y>24</Y>
</Polygon>
<Polygon>
<X>215</X>
<Y>24</Y>
</Polygon>
<Polygon>
<X>215</X>
<Y>58</Y>
</Polygon>
<Polygon>
<X>40</X>
<Y>58</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
<TextDetections>
<Confidence>91</Confidence>
<DetectedText>Sweat drips onto the soil beneath the crops</DetectedText>
<ItemPolygon>
<Height>30</Height>
<Width>164</Width>
<X>40</X>
<Y>81</Y>
</ItemPolygon>
<Polygon>
<X>40</X>
<Y>81</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>81</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>110</Y>
</Polygon>
<Polygon>
<X>40</X>
<Y>110</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
<TextDetections>
<Confidence>97</Confidence>
<DetectedText>Who knows the food on the plate</DetectedText>
<ItemPolygon>
<Height>33</Height>
<Width>164</Width>
<X>40</X>
<Y>129</Y>
</ItemPolygon>
<Polygon>
<X>40</X>
<Y>129</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>129</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>161</Y>
</Polygon>
<Polygon>
<X>40</X>
<Y>161</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
<TextDetections>
<Confidence>99</Confidence>
<DetectedText>Every grain is hard-earned</DetectedText>
<ItemPolygon>
<Height>34</Height>
<Width>165</Width>
<X>39</X>
<Y>181</Y>
</ItemPolygon>
<Polygon>
<X>39</X>
<Y>181</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>181</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>214</Y>
</Polygon>
<Polygon>
<X>39</X>
<Y>214</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
</Detection>
<JobLevel>0</JobLevel>
<TemplateId>t1a545cd125ea04ec7a3cd455065d601cc</TemplateId>
<TemplateName>ImageOCR-34</TemplateName>
</Operation>
<QueueId>pcaffdc4229a543b296b10b22586a1e57</QueueId>
<StartTime>2023-11-25T08:47:40+0800</StartTime>
<State>Success</State>
<Tag>ImageOCR</Tag>
</JobsDetail>
</Response>
The data content is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None
Container for saving results
Container
The content of container node Response:
Node Name (Keyword)
Parent Node
Description
Type
EventName
Response
The value is fixed as TaskFinish
String
JobsDetail
Response
Same as Response.JobsDetail in the submit OCR task API
Container array
If the task is triggered by a workflow, Response.JobsDetail.Input will also include a CosHeaders node, which is of type Container array.
The content of container node CosHeaders:
Node Name (Keyword)
Parent Node
Description
Type
Key
Response.JobsDetail.Input.CosHeaders
Name of custom Header
String
Value
Response.JobsDetail.Input.CosHeaders
Value of custom Header
String
If the task is triggered by a workflow, Response.JobsDetail will also include a Workflow node, which is of type Container.
The content of container node Workflow:
Node Name (Keyword)
Parent Node
Description
Type
RunId
Response.Workflow
Workflow instance ID
String
WorkflowId
Response.Workflow
Workflow ID
String
WorkflowName
Response.Workflow
Workflow name
String
Name
Response.Workflow
Workflow node name
String

Practical Example

Case 1: Task Callback Triggered by a Task Interface, in XML Format

<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2023-11-25T08:47:39+0800</CreationTime>
<EndTime>2023-11-25T08:47:40+0800</EndTime>
<Input>
<BucketId>test-1234567890</BucketId>
<Object>pic/ocr1.png</Object>
<Region>ap-chongqing</Region>
</Input>
<JobId>a3c193f288b2c11eeb60f39de2f86f409</JobId>
<Message/>
<Operation>
<Detection>
<Angel>0</Angel>
<Language/>
<PdfPageSize>0</PdfPageSize>
<TextDetections>
<Confidence>98</Confidence>
<DetectedText>Plow the fields at noon</DetectedText>
<ItemPolygon>
<Height>35</Height>
<Width>176</Width>
<X>40</X>
<Y>24</Y>
</ItemPolygon>
<Polygon>
<X>40</X>
<Y>24</Y>
</Polygon>
<Polygon>
<X>215</X>
<Y>24</Y>
</Polygon>
<Polygon>
<X>215</X>
<Y>58</Y>
</Polygon>
<Polygon>
<X>40</X>
<Y>58</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
<TextDetections>
<Confidence>91</Confidence>
<DetectedText>Sweat drips onto the soil beneath the crops</DetectedText>
<ItemPolygon>
<Height>30</Height>
<Width>164</Width>
<X>40</X>
<Y>81</Y>
</ItemPolygon>
<Polygon>
<X>40</X>
<Y>81</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>81</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>110</Y>
</Polygon>
<Polygon>
<X>40</X>
<Y>110</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
<TextDetections>
<Confidence>97</Confidence>
<DetectedText>Who knows the food on the plate</DetectedText>
<ItemPolygon>
<Height>33</Height>
<Width>164</Width>
<X>40</X>
<Y>129</Y>
</ItemPolygon>
<Polygon>
<X>40</X>
<Y>129</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>129</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>161</Y>
</Polygon>
<Polygon>
<X>40</X>
<Y>161</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
<TextDetections>
<Confidence>99</Confidence>
<DetectedText>Every grain is hard-earned</DetectedText>
<ItemPolygon>
<Height>34</Height>
<Width>165</Width>
<X>39</X>
<Y>181</Y>
</ItemPolygon>
<Polygon>
<X>39</X>
<Y>181</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>181</Y>
</Polygon>
<Polygon>
<X>203</X>
<Y>214</Y>
</Polygon>
<Polygon>
<X>39</X>
<Y>214</Y>
</Polygon>
<WordPolygon/>
<Words>
<Character/>
<Confidence>0</Confidence>
<WordCoordPoint/>
</Words>
</TextDetections>
</Detection>
<JobLevel>0</JobLevel>
<TemplateId>t1a545cd125ea04ec7a3cd455065d601cc</TemplateId>
<TemplateName>ImageOCR-34</TemplateName>
</Operation>
<QueueId>pcaffdc4229a543b296b10b22586a1e57</QueueId>
<StartTime>2023-11-25T08:47:40+0800</StartTime>
<State>Success</State>
<Tag>ImageOCR</Tag>
</JobsDetail>
</Response>

Case 2: Task Callback Triggered by a Task API in JSON Format

{
"Response": {
"EventName": "TaskFinish",
"JobsDetail": [{
"Code": "Success",
"CreationTime": "2023-11-25T08:47:39+0800",
"EndTime": "2023-11-25T08:47:40+0800",
"Input": {
"BucketId": "test-1234567890",
"Object": "pic/ocr1.png",
"Region": "ap-chongqing"
},
"JobId": "a3c193f288b2c11eeb60f39de2f86f409",
"Operation": {
"Detection": {
"Angel": "0",
"PdfPageSize": "0",
"Language": "",
"TextDetections": [{
"Confidence": 98,
"DetectedText": "Toiling under the midday sun"
"ItemPolygon": [{
"Height": 35,
"Width": 176,
"X": 40,
"Y": 24
}],
"Polygon": [{
"X": 40,
"Y": 24
},
{
"X": 215,
"Y": 24
},
{
"X": 215,
"Y": 58
},
{
"X": 40,
"Y": 58
}
],
"Words": [{
"Confidence": 0
}]
},
{
"Confidence": 91,
"DetectedText": "Sweat drips onto the soil beneath the crops"
"ItemPolygon": [{
"Height": 30,
"Width": 164,
"X": 40,
"Y": 81
}],
"Polygon": [{
"X": 40,
"Y": 81
},
{
"X": 203,
"Y": 81
},
{
"X": 203,
"Y": 110
},
{
"X": 40,
"Y": 110
}
],
"Words": [{
"Confidence": 0
}]
},
{
"Confidence": 97,
"DetectedText": "Who knows the food on the plate"
"ItemPolygon": [{
"Height": 33,
"Width": 164,
"X": 40,
"Y": 129
}],
"Polygon": [{
"X": 40,
"Y": 129
},
{
"X": 203,
"Y": 129
},
{
"X": 203,
"Y": 161
},
{
"X": 40,
"Y": 161
}
],
"Words": [{
"Confidence": 0
}]
},
{
"Confidence": 99,
"DetectedText": "Every grain is hard-earned"
"ItemPolygon": [{
"Height": 34,
"Width": 165,
"X": 39,
"Y": 181
}],
"Polygon": [{
"X": 39,
"Y": 181
},
{
"X": 203,
"Y": 181
},
{
"X": 203,
"Y": 214
},
{
"X": 39,
"Y": 214
}
],
"Words": [{
"Confidence": 0
}]
}
]
},
"JobLevel": 0,
"TemplateId": "t1a545cd125ea04ec7a3cd455065d601cc",
"TemplateName": "ImageOCR-34"
},
"QueueId": "pcaffdc4229a543b296b10b22586a1e57",
"StartTime": "2023-11-25T08:47:40+0800",
"State": "Success",
"Tag": "ImageOCR"
}]
}
}


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백