tencent cloud

APIs

CreateWorkflow

下载
聚焦模式
字号
最后更新时间: 2026-10-11 15:48:18

1. API Description

Domain name for API request: databuddy.intl.tencentcloudapi.com.

Create a workflow

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateWorkflow.
Version Yes String Common Params. The value used for this API: 2026-07-15.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
WorkspaceId Yes String

Workspace ID, which can be obtained through ListWorkspaces. Required.

BaseInfo Yes WorkflowBaseInfo

Workflow basic info. Required, where WorkflowName is required and unique within the workspace

Trigger.N No Array of WorkflowTriggerConfiguration

Workflow scheduling configuration.

ParamList.N No Array of ParamInfo

Workflow parameter list

LabelList.N No Array of LabelBrief

Tag list.

Alarm No AlarmBrief

Workflow alert configuration.

MonitorMetric No MonitorMetricBrief

Monitoring metrics configuration. If monitoring and alerting is selected in the alarm condition, this field is required.

AdvanceConfig No WorkflowAdvanceConfig

Workflow advanced setting.

TaskList.N No Array of WorkflowTask

Workflow task list

BundleId No String

BundleId, obtainable through the Bundle API

BundleInfo No String

Bundle information

GitConfigId No String

Git configuration ID, which can be obtained through Git configuration APIs.

GitBranch No String

Git branch information.

3. Output Parameters

Parameter Name Type Description
Data CreateWorkflowRsp

Create workflow response content

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Creating a Workflow Carrying a python Task

Create a workflow carrying a python task

Input Example

POST / HTTP/1.1
Host: databuddy.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateWorkflow
<Common request parameters>

{
    "WorkspaceId": "17697410068842890",
    "BaseInfo": {
        "WorkflowName": "*n**g*****n*pr**"
    },
    "AdvanceConfig": {
        "QueuingMode": "OFF",
        "MaxConcurrentNum": 1
    },
    "TaskList": [
        {
            "ParamList": [],
            "DependOnList": [],
            "TaskName": "py_0807",
            "TaskType": {
                "TaskTypeName": "PYTHON",
                "TaskTypePropertyList": [
                    {
                        "PropertyKey": "Source",
                        "PropertyValue": "5"
                    }
                ],
                "RuntimePropertyList": [
                    {
                        "PropertyKey": "ResourceMode",
                        "PropertyValue": "1"
                    }
                ]
            },
            "ResourceGroupId": "res-ea***8f8",
            "TaskRetryStrategy": {},
            "DependOnRunCondition": "ALL_SUCCESS",
            "LeftCoordinate": 50,
            "TopCoordinate": 50
        }
    ]
}

Output Example

{
    "Response": {
        "Data": {
            "WorkflowId": "9a1670f3-14df-4869-9f38-ec31a4c4aac9"
        },
        "RequestId": "81772cad-5e71-4a7c-b063-a7b5db0d929a"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
FailedOperation.CallThirdPartApiError Failed to call the <apiName> API of the <serviceName> service: <message>.
FailedOperation.CreateWorkflowFailed Failed to create workflow
FailedOperation.LabelCountLimit Number of tags has reached the upper limit.
FailedOperation.WorkflowCountLimit Workflow number exceeds the upper limit of 10000.
FailedOperation.WorkflowCreateLockAcquireFailed Failed to obtain the distributed lock for the workflow name.
FailedOperation.WorkflowNoPermission No operation permissions.
InvalidParameter Parameter error.
InvalidParameterValue Parameter value error.
InvalidParameterValue.DuplicateTaskNameError Duplicate tasks exist in the same workflow.
InvalidParameterValue.ParamIllegalError Parameter <parameter> does not meet requirements: <message>
InvalidParameterValue.TaskHookValidationFailed Referenced object does not exist or has been deleted
InvalidParameterValue.TaskNameContainsIllegalCharactersError Task name contains invalid characters
InvalidParameterValue.TaskNameExceedsLimitError Task name exceeds the maximum number of characters (128).
InvalidParameterValue.TaskTypeNotSupportResourceGroup Remove the resource group configuration of this task type
InvalidParameterValue.TaskTypePropertyKeyValueRequestRequiredError Task type attribute value is required in input parameters, but it is not transmitted.
InvalidParameterValue.WorkflowNameExists Workflow name already exists.
InvalidParameterValue.WorkflowNameInvalid Invalid workflow name.
InvalidParameterValue.WorkflowTriggerAdvancedConfigError Please check the advanced configuration of the workflow trigger and fix the illegal JSON content.
MissingParameter Parameters are missing.
ResourceNotFound.WorkflowNotFound Workflow not found according to the input workflow ID

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈