---
title: "创建工单"
method: POST
path: "/v2/projects/{project_name}/workflows"
tags: ["workflow"]
---

# 创建工单

`POST /v2/projects/{project_name}/workflows`

create workflow

## Path parameters

- `project_name` string, required

## Request body

- V2CreateWorkflowReqV2
  - `desc` string
  - `ops_type_uid` string — OpsTypeUID 运维类型字典项标识；可选；空表示未设置；创建后不可改
  - `sql_version_id` integer
  - `task_ids` integer[]
  - `workflow_subject` string
  - `workflow_template_id` integer

## Response `200`

OK

- V2CreateWorkflowResV2
  - `code` integer
  - `data` V2CreateWorkflowResV2Data
    - `workflow_id` string
  - `message` string

---

[API](https://skmtc.dev/actiontech/apis/sqle-api-docs.md) · [All operations](https://skmtc.dev/actiontech/apis/sqle-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/actiontech/sqle-api-docs/revisions/3e36a0067703/schema)
