GET
/
api
/
workflows
/
{workflowName}
/
runs
/
{runId}
/
replay
读取运行回放
curl --request GET \
  --url https://wfapi.yuhe.space/api/workflows/{workflowName}/runs/{runId}/replay \
  --header 'Authorization: Bearer <token>'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "workflowId": "<string>",
    "workflowName": "<string>",
    "target": "<string>",
    "resolvedTarget": "<string>",
    "params": [
      {}
    ],
    "run": {
      "runId": "<string>",
      "workflowName": "<string>",
      "target": "<string>",
      "resolvedTarget": "<string>",
      "args": [
        "<string>"
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "durationMs": 123,
      "exitCode": 123,
      "stdout": "<string>",
      "stderr": "<string>",
      "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"
        }
      ]
    },
    "messages": [
      {
        "id": "<string>",
        "content": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "runId": "<string>",
        "items": [
          {
            "id": "<string>",
            "title": "<string>",
            "content": "<unknown>",
            "icon": "<string>",
            "collapsed": true,
            "metadata": {}
          }
        ],
        "timers": [
          {
            "errCode": 0,
            "errMessage": "",
            "timerId": "<string>",
            "title": "<string>",
            "startedAt": "2023-11-07T05:31:56Z",
            "endedAt": "2023-11-07T05:31:56Z",
            "durationMs": 123,
            "message": "<string>",
            "metadata": {}
          }
        ],
        "displayInput": "<string>",
        "attachments": [
          {
            "id": "<string>",
            "name": "<string>",
            "mimeType": "<string>",
            "size": 123,
            "storage": "server",
            "createdAt": "2023-11-07T05:31:56Z",
            "workflowId": "<string>",
            "conversationId": "<string>"
          }
        ]
      }
    ],
    "attachments": [
      {
        "id": "<string>",
        "name": "<string>",
        "mimeType": "<string>",
        "size": 123,
        "storage": "server",
        "createdAt": "2023-11-07T05:31:56Z",
        "workflowId": "<string>",
        "conversationId": "<string>"
      }
    ],
    "outputItems": [
      {
        "id": "<string>",
        "title": "<string>",
        "content": "<unknown>",
        "icon": "<string>",
        "collapsed": true,
        "metadata": {}
      }
    ],
    "timers": [
      {
        "errCode": 0,
        "errMessage": "",
        "timerId": "<string>",
        "title": "<string>",
        "startedAt": "2023-11-07T05:31:56Z",
        "endedAt": "2023-11-07T05:31:56Z",
        "durationMs": 123,
        "message": "<string>",
        "metadata": {}
      }
    ],
    "conversationId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflowName
string
required
runId
string
required

Query Parameters

messageLimit
integer

conversation replay 返回的 message 上限。默认 20,服务端限制在 1 到 100。

Required range: 1 <= x <= 100

Response

200 - application/json

运行回放;普通 workflow 输出使用 outputItems,conversation 输出写入 messages[].items。管理端回放返回预览安全内容,超大 args/report/output item 会被截断,完整原始内容请读取单条 run 详细日志。

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