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

Workflow Operations

PDF
Focus Mode
Font Size
Last updated: 2024-02-02 16:51:03

Overview

This document provides an overview of APIs and SDK code samples for media processing workflows in CI, with the animated image job as an example.
API
Operation
Description
Deleting workflow
Deletes workflow
Querying workflow
Queries workflow
Querying workflow instance details
Queries workflow instance details
Querying workflow details list
Gets workflow instance list
Triggering workflow
Executes workflow

Deleting Workflow

Feature description

This API is used to delete a workflow.

Method prototype

public Boolean deleteWorkflow(MediaWorkflowListRequest request);

Parameter description

Request has the following sub-nodes:
Node Name (Keyword)
Description
Type
Required
bucketName
Bucket name in the format of BucketName-APPID. For more information, see Bucket Overview.
String
Yes
workflowId
Workflow ID
String
Yes

Response description

Success: true is returned upon success.
Failure: An error (such as the bucket does not exist) occurs, throwing the CosClientException or CosServiceException exception. For more information, see Troubleshooting.

Sample request

//1. Create a workflow request object
MediaWorkflowListRequest request = new MediaWorkflowListRequest();
//2. Add request parameters as detailed in the API documentation
request.setBucketName("examplebucket-1250000000");
request.setWorkflowId("aaaa");
Boolean response = client.deleteWorkflow(request);

Querying Workflow

Feature description

This API is used to search for a workflow.

Method prototype

public MediaWorkflowListResponse describeWorkflow(MediaWorkflowListRequest request);

Parameter description

Parameter
Description
Type
Required
bucketName
Bucket name in the format of BucketName-APPID. For more information, see Bucket Overview.
String
Yes
ids
Workflow ID. If you enter multiple IDs, separate them with commas (,).
String
No
name
Workflow name.
String
No
pageNumber
Page number.
String
No
pageSize
Number of entries per page.
String
No

Response description

Success: A workflow set response object is returned, which contains the workflow object set.
Failure: An error (such as authentication failure) occurs, throwing the "CosClientException" or "CosServiceException" exception. For more information, see Troubleshooting.

Sample request

//1. Create a workflow request object
MediaWorkflowListRequest request = new MediaWorkflowListRequest();
//2. Add request parameters as detailed in the API documentation
request.setBucketName("examplebucket-1250000000");
MediaWorkflowListResponse response = client.describeWorkflow(request);
List<MediaWorkflowObject> mediaWorkflowList = response.getMediaWorkflowList();

Querying Workflow Instance Details

Feature description

This API is used to query the details of a workflow instance.

Method prototype

public MediaWorkflowExecutionResponse describeWorkflowExecution(MediaWorkflowListRequest request);

Parameter description

Parameter
Description
Type
Required
bucketName
Bucket name in the format of BucketName-APPID. For more information, see Bucket Overview.
String
Yes
runId
Workflow instance ID
String
Yes

Response description

Success: A workflow instance response wrapper class is returned, which contains the workflow instance details object.
Failure: An error (such as authentication failure) occurs, throwing the "CosClientException" or "CosServiceException" exception. For more information, see Troubleshooting.

Sample request

//1. Create a workflow request object
MediaWorkflowListRequest request = new MediaWorkflowListRequest();
//2. Add request parameters as detailed in the API documentation
request.setBucketName("examplebucket-1250000000");
request.setRunId("i34bfd8d7eae711ea89fe525400c******");
MediaWorkflowExecutionResponse response = client.describeWorkflowExecution(request);

Querying Workflow Details List

Feature description

This API is used to query the list of workflow details.

Method prototype

public MediaWorkflowExecutionsResponse describeWorkflowExecutions(MediaWorkflowListRequest request);

Parameter description

Node Name
Description
Type
Required
bucketName
Bucket name in the format of BucketName-APPID. For more information, see Bucket Overview.
String
Yes
workflowId
Workflow ID
String
Yes
name
Filename
String
No
orderByTime
Desc (default) or Asc
String
No
size
Maximum number of jobs that can be pulled. The default value is 10. The maximum value is 100.
String
No
states
Workflow instance status. If you enter multiple statuses, separate them with commas (,).
Valid values: All, Success, Failed, Running, Cancel. Default value: All
String
No
startCreationTime
Start time of the time range for job pulling in the format of %Y-%m-%dT%H:%m:%S%z
String
No
endCreationTime
End time of the time range for job pulling in the format of %Y-%m-%dT%H:%m:%S%z
String
No
nextToken
Context token for pagination
String
No

Response description

Success: A workflow instance set response object is returned, which contains the workflow object instance set.
Failure: An error (such as authentication failure) occurs, throwing the "CosClientException" or "CosServiceException" exception. For more information, see Troubleshooting.

Sample request

//1. Create a workflow request object
MediaWorkflowListRequest request = new MediaWorkflowListRequest();
//2. Add request parameters as detailed in the API documentation
request.setBucketName("examplebucket-1250000000");
request.setWorkflowId("w4e6963a18e2446ed8bc8f09410e******");
MediaWorkflowExecutionsResponse response = client.describeWorkflowExecutions(request);
List<MediaWorkflowExecutionObject> workflowExecutionList = response.getWorkflowExecutionList();

Manually Triggering Workflow

Feature description

This API is used to manually trigger a workflow.

Method prototype

public MediaWorkflowListResponse triggerWorkflowList(MediaWorkflowListRequest request);

Sample request

//1. Create a workflow request object
MediaWorkflowListRequest request = new MediaWorkflowListRequest();
//2. Add request parameters as detailed in the API documentation
request.setBucketName("DemoBucket-123456789");
request.setWorkflowId("we32f75950afe4a4682463d8158d*****");
request.setObject("1.mp4");
MediaWorkflowListResponse response = client.triggerWorkflowList(request);

Parameter description

Node Name
Description
Type
Required
bucketName
Bucket name in the format of BucketName-APPID. For more information, see Bucket Overview.
String
Yes
object
Name of the object that requires workflow processing
String
Yes
workflowId
ID of the workflow to trigger
String
Yes
name
Name of the existing triggered job, which can contain up to 128 letters, digits, hyphens, and underscores and is empty by default.
String
No

Response description

Success: The MediaWorkflowListResponse instance is returned.
Failure: An error (such as authentication failure) occurs, throwing the "CosClientException" or "CosServiceException" exception. For more information, see Troubleshooting.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback