POST
/
api
/
workflows
/
{workflowName}
/
runs
/
{runId}
/
user-input
提交用户输入并恢复等待中的 run
curl --request POST \
  --url https://wfapi.yuhe.space/api/workflows/{workflowName}/runs/{runId}/user-input \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "requestId": "demo:20260604-abc:approval",
  "values": {
    "approved": true,
    "note": "continue"
  }
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "runId": "<string>",
    "workflowName": "<string>",
    "requestId": "<string>",
    "result": {
      "runId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "target": "<string>",
      "resolvedTarget": "<string>",
      "args": [
        "<string>"
      ],
      "durationMs": 123,
      "stdout": "<string>",
      "stderr": "<string>",
      "exitCode": 123,
      "report": {},
      "conversationId": "<string>",
      "external": {
        "principalKind": "<string>",
        "actorType": "<string>",
        "actorUserId": "<string>",
        "actorProfileId": "<string>",
        "actorDisplayName": "<string>",
        "apiKeyId": "<string>",
        "apiKeyName": "<string>",
        "user": "<string>",
        "conversationId": "<string>",
        "inputs": {},
        "files": [
          "<unknown>"
        ],
        "webhook": {
          "workflowName": "<string>",
          "requestId": "<string>",
          "target": "<string>",
          "resolvedTarget": "<string>",
          "headers": {}
        }
      },
      "debugNode": "<string>",
      "pendingUserInput": {
        "requestId": "<string>",
        "nodeName": "<string>",
        "title": "<string>",
        "params": [
          {}
        ],
        "createdAt": "2023-11-07T05:31:56Z",
        "description": "<string>",
        "defaultValues": {},
        "metadata": {}
      },
      "resolvedUserInputs": [
        {
          "requestId": "<string>",
          "nodeName": "<string>",
          "values": {},
          "submittedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflowName
string
required
runId
string
required

Body

application/json
requestId
string
required
values
object
required
toolPermissionPolicies
object
Example:
{
"search": { "enabled": true, "autoApprove": false }
}

Response

恢复后的运行结果。

errCode
integer
required
errMessage
string
required
Allowed value: ""
data
object
required