自动化

列出等待点

按账本顺序列出运行的等待点。

按账本顺序列出运行的等待点。包括当前及历史的 event、timer 与 child 等待点。

GET /automation/v1/runs/{id}/waits

鉴权

Authorization: Bearer $PRAXIS_API_KEY

请求字段

参数类型说明
path: idstring必填;运行 ID(run_)。
query: limitinteger可选;每页条数,整数 1–100,默认 50。 minimum: 1;maximum: 100
query: cursorstring可选;上一页返回的 next_cursor,不透明字符串;保持原查询条件继续翻页。

示例

先设置以下环境变量,使用你自己的资源:

: "${RUN_ID:?Set RUN_ID}"
curl --fail-with-body -X GET "https://api.deepraxis.ai/automation/v1/runs/${RUN_ID}/waits" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
import { createAutomationClient } from '@deepractice-ai/praxis-sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.ai',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.runs.waits.list({
  "path": {
    "id": env("RUN_ID")
  }
});
console.log(result);

响应

HTTP 200

Success

application/json

字段类型说明
dataobject[]必填 / 必有;本页的等待点(当前与历史),按 created_at 倒序、id 倒序排列。
data[].idstring必填 / 必有;等待点 ID,前缀 wait_;完成事件等待点时作为路径中的 wait_id。
data[].run_idstring必填 / 必有;所属运行 ID(run_ 前缀)。
data[].kind"event" / "timer" / "child"必填 / 必有;等待类型。event 等待外部事件,可通过 runs.completeWait 提交;timer 等待到达 resume_at;child 等待子运行结束。
data[].state"cancelled" / "open" / "resolved" / "expired"必填 / 必有;等待点状态。open 仍在等待;resolved 已被满足;expired 已超过 expires_at;cancelled 已被取消,不会再被满足。
data[].tasknull / object必填 / 必有;产生该等待的工作流步骤 {reference, name};没有对应步骤为 null。
data[].task(分支2).referencestring必填 / 必有;步骤的 JSON Pointer,例如 /do/2/wait_payment。
data[].task(分支2).namestring必填 / 必有;步骤名,即工作流 YAML 中的键。
data[].resume_atnull / string必填 / 必有;kind=timer 时恢复运行的时刻(RFC 3339 UTC);其它类型为 null。
data[].event_typenull / string必填 / 必有;kind=event 时等待的事件类型;其它类型为 null。
data[].child_run_idnull / string必填 / 必有;kind=child 时被等待的子运行 ID;其它类型为 null。
data[].created_atstring必填 / 必有;等待点创建时间(RFC 3339 UTC)。
data[].expires_atnull / string必填 / 必有;等待点到期时间(RFC 3339 UTC);没有期限为 null。
data[].resolved_atnull / string必填 / 必有;等待点被满足的时间(RFC 3339 UTC);尚未满足为 null。
next_cursornull / string必填 / 必有;下一页游标,原样传给 cursor 参数并保持原查询条件;没有更多页为 null。接口不返回总数。

实测响应

HTTP 200

{
  "data": [
    {
      "id": "wait_wf-eebc9ef34869206fa1bcc1e2ae6375990a7ab34c5ad485ac98a4f189c4b37346",
      "run_id": "run_00mv67mkw52c7fa90cc9649b1053e66fd836b071f289acb667ff8ca853e65bc4608e9a45bd",
      "kind": "event",
      "state": "open",
      "task": {
        "reference": "/do/0/ready",
        "name": "ready"
      },
      "resume_at": null,
      "event_type": "ready",
      "child_run_id": null,
      "created_at": "2026-10-13T04:57:56.982Z",
      "expires_at": "2026-10-14T04:57:50.405Z",
      "resolved_at": null
    }
  ],
  "next_cursor": null
}

错误码

HTTP错误码与说明
400INVALID_PARAMS:请求参数、路径、游标或请求体格式无效。
404RUN_NOT_FOUND:运行不存在或当前租户不可见。
defaultRFC 9457 automation problem. 429 includes Retry-After.

鉴权错误与通用错误 · 排查时保留响应头 X-Request-Id。

导出

本页内容