tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Submitting a task

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-01-13 17:28:45

Description

Submit a task for detecting abnormal images.

Authorization Description

When a sub-account is used, you need to grant corresponding permissions in the action of the authorization policy. For all operation interfaces supported by Cloud Infinite, see CI action.
When using the feature for detecting abnormal images (asynchronous), you need to add the ci:CreateMediaJobs permission in the action of the authorization policy.
When using the interface for asynchronous processing, you need to add the cam:passrole permission to the action of the authorization policy. The interface for asynchronous processing will perform read and write operations on COS resources via CAM "roles". The PassRole permission is used to pass roles. For details, see CAM > Write Operations > PassRole Interface.

Service Activation

To use this feature, you need to bind Bucket in advance and activate the Cloud Infinite service.
To use this feature, you need to activate the service for Image Processing (asynchronous) in advance via the interface.
Note:
After Cloud Infinite is bound, if you manually unbind Cloud Infinite from the Bucket, you will not be able to continue using this feature.

Use Limits

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

Fee Instructions

This interface is a paid service, and the incurred fees will be charged by Cloud Infinite. For detailed billing information, refer to Image Processing Fees.


Request

Request sample

POST /jobs HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Note:
Authorization: Auth String. For details, see the Request Signature documentation.

Request header

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

Request body

The following figure shows the request bodies required for implementing this request operation.
<Request>
<Tag>ImageInspect</Tag>
<Input>
<Object>input/test.png</Object>
</Input>
<Operation>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON</CallBackFormat>
</Request>
The detailed data descriptions are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Request
None.
Container for saving requests
Container
Yes
Detailed data descriptions for the Request of Container type are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Tag
Request
Tag for creating tasks: ImageInspect
String
Yes
Input
Request
File information to be operated on
Container
Yes
Operation
Request
Operational Rules
Container
No
CallBackFormat
Request
The callback format for tasks, either JSON or XML, with XML as the default. This takes precedence over the callback format of the Queue.
String
No
CallBackType
Request
The callback type for tasks, either Url or TDMQ, with Url as the default. This takes precedence over the callback type of the Queue.
String
No
CallBack
Request
The callback address for tasks takes precedence over the callback address of the Queue. When set to "no", no callback will be generated for the Queue's callback address.
String
No
CallBackMqConfig
Request
TDMQ configuration for task callback, required when CallBackType is TDMQ. For details, see CallBackMqConfig
Container
No
Detailed data descriptions for the Container type
Operation
are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
UserData
Request.Operation
Passthrough user information, printable ASCII characters, length up to 1024.
String
No
JobLevel
Request.Operation
Range for the priority level of tasks: 0, 1, 2. The higher the level, the higher the priority. Default is 0.
String
No
ImageInspect
Request.Operation
The parameters of the task
Container
No
Detailed data descriptions for the Container type ImageInspect are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
AutoProcess
Request.Operation.ImageInspect
Whether to enable automatic actions such as moving to another directory, setting to private permissions, or deleting images upon detecting abnormalities. Values: true/false. Default is false.
String
No
ProcessType
Request.Operation.ImageInspect
Specifying the actions to take after detecting abnormal images
BackupObject: Move the images to abnormal_images_backup, which is automatically created by the backend.
SwitchObjectToPrivate: Set the image permissions to private.
DeleteObject: Delete images.
Default value: BackupObject
When AutoProcess is true, this parameter takes effect.
String
No
Detailed data descriptions for the Input of the Container type are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Object
Request.Input
File path
String
Yes

Response

Response Headers

This API only returns common response headers. For details, see Common Response Headers.

Response Body

The response body returns application/xml data. The content containing complete data of the node is displayed as follows:
<Response>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>cda071f3af9e011ed8f900133752da9af</JobId>
<State>Submitted</State>
<CreationTime>2022-06-27T15:23:10+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>p3a3b198088e74b76b31d553a77b656be</QueueId>
<Tag>ImageInspect</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/test.png</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>
The specific data content is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Content of the Response of the Container node:
Node Name (Keyword)
Parent Node
Description
Type
JobsDetail
Response
Task details
Container array
Container node
JobsDetail
content:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail
Error code, which applies when the State is Failed.
String
Message
Response.JobsDetail
Error description, which applies when the State is Failed.
String
JobId
Response.JobsDetail
ID of the newly created task
String
Tag
Response.JobsDetail
Tag of the newly created task: ImageInspect
String
State
Response.JobsDetail
Task Status
Submitted: Submitted, pending execution
Running: Running
Success: Execution success
Failed: Execution failure
Pause: Task paused. When the Queue is paused, pending tasks will enter the paused state.
Cancel: Task canceled.
String
CreationTime
Response.JobsDetail
Creation Time of the Task
String
StartTime
Response.JobsDetail
Start Time of the Task
String
EndTime
Response.JobsDetail
End Time of the Task
String
QueueId
Response.JobsDetail
Queue ID of the Task
String
Input
Response.JobsDetail
The location of the input resource for the task
Container
Operation
Response.JobsDetail
The rules of the task
Container
Content of the Container node Input:
Node Name (Keyword)
Parent Node
Description
Type
Region
Response.JobsDetail.Input
Bucket Region
String
BucketId
Response.JobsDetail.Input
Bucket where the source file is located
String
Object
Response.JobsDetail.Input
Source file name
String
Content of the Container node Operation:
Node Name (Keyword)
Parent Node
Description
Type
UserData
Response.JobsDetail.Operation
Passthrough user information
String
JobLevel
Response.JobsDetail.Operation
Task priority.
String
ImageInspect
Response.JobsDetail.Operation
The Request.Operation.ImageInspect in the same request
Container
ImageInspectResult
Response.JobsDetail.Operation
Results of abnormal image detection, not returned while the task is in progress
Container
Content of the Container node ImageInspectResult:
Node Name (Keyword)
Parent Node
Description
Type
State
Response.JobsDetail.Operation.ImageInspectResult
The task status of the current node, which can be either Success or Failed.
String
Code
Response.JobsDetail.Operation.ImageInspectResult
Error code, which is meaningful only when the State is Failed.
String
Message
Response.JobsDetail.Operation.ImageInspectResult
Error description, only meaningful when the State is Failed.
String
InputObjectName
Response.JobsDetail.Operation.ImageInspectResult
Input object name of the current node
String
InputObjectUrl
Response.JobsDetail.Operation.ImageInspectResult
URL of the input object of the current node
String
ProcessResult
Response.JobsDetail.Operation.ImageInspectResult
Details of the processing result of the current node
Container
Content of the ProcessResult of the Container node:
Node Name (Keyword)
Parent Node
Description
Type
PicSize
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Size of the original image to be detected, in Bytes
Int
PicType
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Detected original image type, for example, jpg, png.
String
Suspicious
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Indicates whether files other than image formats are detected. false indicates a normal image file, true indicates a suspicious file containing other formats.
String
SuspiciousBeginByte
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Starting byte position of the detected suspicious file, in Bytes
Int
SuspiciousEndByte
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
End byte position of the detected suspicious file, in Bytes
Int
SuspiciousSize
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Size of the detected suspicious file
Int
SuspiciousType
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Type of the detected suspicious file, for example, MPEG-TS
String
AutoProcessResult
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult
Result of automatic image processing after the image is detected as a suspicious file
Container
Content of the AutoProcessResult of the Container node:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult.AutoProcessResult
Error code of the automatic processing result, one of Success or Failed.
String
Message
Response.JobsDetail.Operation.ImageInspectResult.ProcessResult.AutoProcessResult
Error message of the automatic processing result, valid when State is Failed.
String

Error Codes

This request operation has no special error messages. For common error messages, see Error Codes.

Practical Case

Request:

POST /jobs HTTP/1.1
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
Content-Length: 166
Content-Type: application/xml

<Request>
<Tag>ImageInspect</Tag>
<Input>
<Object>input/test.png</Object>
</Input>
<Operation>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON</CallBackFormat>
</Request>

Response

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

<Response>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>cda071f3af9e011ed8f900133752da9af</JobId>
<State>Submitted</State>
<CreationTime>2022-06-27T15:23:10+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>p2242ab62c7c94486915508540933a2c6</QueueId>
<Tag>ImageInspect</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/test.png</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>

Ajuda e Suporte

Esta página foi útil?

comentários