公开入口运行 workflow
curl --request POST \
--url https://wfapi.yuhe.space/embed/api/workflows/{workflowName}/run \
--header 'Content-Type: application/json' \
--header 'x-workflow-embed-token: <api-key>' \
--data '
{
"token": "wfembed_xxx",
"inputs": {
"message": "hello"
},
"conversation_id": "browser-thread",
"user": "visitor-1",
"toolPermissionPolicies": {
"search": {
"enabled": true,
"autoApprove": false
}
}
}
'{
"errCode": 123,
"errMessage": "<string>",
"data": {
"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
公开入口运行 workflow
POST
/
embed
/
api
/
workflows
/
{workflowName}
/
run
公开入口运行 workflow
curl --request POST \
--url https://wfapi.yuhe.space/embed/api/workflows/{workflowName}/run \
--header 'Content-Type: application/json' \
--header 'x-workflow-embed-token: <api-key>' \
--data '
{
"token": "wfembed_xxx",
"inputs": {
"message": "hello"
},
"conversation_id": "browser-thread",
"user": "visitor-1",
"toolPermissionPolicies": {
"search": {
"enabled": true,
"autoApprove": false
}
}
}
'{
"errCode": 123,
"errMessage": "<string>",
"data": {
"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 传入。
Path Parameters
Body
application/json
⌘I