POST
/
workflows
/
{workflowName}
/
run
按路径指定 workflow 外部运行
curl --request POST \
  --url https://wfapi.yuhe.space/workflows/{workflowName}/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user": "external-user",
  "workflow": "smoke",
  "workflow_id": "<string>",
  "workflowName": "<string>",
  "workflowId": "<string>",
  "inputs": {},
  "args": [
    "<string>"
  ],
  "files": [
    "<unknown>"
  ],
  "conversation_id": "<string>",
  "conversationId": "<string>",
  "response_mode": "blocking",
  "target": "latest",
  "version": "<string>"
}
'
{
  "workflow_run_id": "<string>",
  "task_id": "<string>",
  "data": {
    "id": "<string>",
    "workflow_id": "<string>",
    "outputs": {
      "errCode": 123,
      "errMessage": "<string>",
      "items": [
        {
          "id": "<string>",
          "title": "<string>",
          "content": "<unknown>",
          "icon": "<string>",
          "collapsed": true,
          "metadata": {}
        }
      ]
    },
    "error": "<string>",
    "elapsed_time": 123,
    "total_tokens": 123,
    "total_steps": 123,
    "created_at": 123,
    "finished_at": 123,
    "conversation_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

使用 WORKFLOW_SERVER_ADMIN_KEY 或已创建的账号 API Key。

Path Parameters

workflowName
string
required

Body

application/json
user
string
required
Example:

"external-user"

workflow
string

路径中已有 workflowName,可省略。

Example:

"smoke"

workflow_id
string
workflowName
string
workflowId
string
inputs
object

按 workflow executor.params 命名传入结构化输入。multiple: truecontrol: "checkboxes" 的非 file 参数会序列化为 JSON 数组字符串。 control: "textarea" 只影响 App/server 表单展示,仍按普通字符串输入处理。 boolean 参数默认值为 "true" 且输入 false 时会显式传入 false

args
string[]
files
any[]
conversation_id
string
conversationId
string
response_mode
enum<string>
default:blocking
Available options:
blocking,
streaming
target
string

latest、draft 或语义化版本号。

Example:

"latest"

version
string

指定语义化版本号的别名;未提供 target 时会作为运行目标。

Response

/workflows/run 相同。

workflow_run_id
string
required
task_id
string
required
data
object
required