公开入口提交用户输入
curl --request POST \
--url https://wfapi.yuhe.space/embed/api/workflows/{workflowName}/runs/{runId}/user-input \
--header 'Content-Type: application/json' \
--header 'x-workflow-embed-token: <api-key>' \
--data '
{
"token": "wfembed_xxx",
"requestId": "demo:20260604-abc:approval",
"values": {
"approved": true
},
"toolPermissionPolicies": {
"search": {
"enabled": true,
"autoApprove": false
}
}
}
'{
"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"
}
]
}
}
}Embed
公开入口提交用户输入
POST
/
embed
/
api
/
workflows
/
{workflowName}
/
runs
/
{runId}
/
user-input
公开入口提交用户输入
curl --request POST \
--url https://wfapi.yuhe.space/embed/api/workflows/{workflowName}/runs/{runId}/user-input \
--header 'Content-Type: application/json' \
--header 'x-workflow-embed-token: <api-key>' \
--data '
{
"token": "wfembed_xxx",
"requestId": "demo:20260604-abc:approval",
"values": {
"approved": true
},
"toolPermissionPolicies": {
"search": {
"enabled": true,
"autoApprove": false
}
}
}
'{
"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
Embed token;也可通过 query/body 的 token 传入。
Body
application/json
⌘I