跳转到主要内容
GET /api/v1/forward/schedule_runs 查询某个 Identity 下的 Schedule Run;传入 schedule_id 可收敛到单个 Schedule。

请求头

Header是否必填说明
AuthorizationBearer <PAT>

查询参数

参数类型是否必填默认值说明
identity_idstring-Run 所属 Forward Identity ID。
schedule_idstring-按 Schedule ID 过滤。
statusstring-pendingrunningcompletedfailedskipped 过滤。
trigger_typestring-schedulemanual 过滤。
has_errorboolean-是否只返回有错误或无错误的 Run。
limitinteger20分页大小,最大 100。
after_idstring-向后翻页游标。
before_idstring-向前翻页游标。

示例请求

curl -s -X GET 'https://api.qoder.com/api/v1/forward/schedule_runs' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "id": "srun_019f00112233445566778899aabbccdd",
      "schedule_id": "sched_019f00112233445566778899aabbccdd",
      "identity_id": "idn_019eabc123",
      "template_id": "tmpl_support",
      "session_id": "sess_019ec55a68b37e1e8d660691af161ab4",
      "status": "completed",
      "trigger_context": {
        "type": "schedule",
        "scheduled_at": "2026-06-22T01:00:00Z"
      },
      "result_payload": "Today's technology highlights: ...",
      "push_sink": "im_channel",
      "push_status": "succeeded",
      "push_finished_at": "2026-06-22T01:00:21Z",
      "attempt": 1,
      "triggered_at": "2026-06-22T01:00:00Z",
      "started_at": "2026-06-22T01:00:03Z",
      "completed_at": "2026-06-22T01:00:20Z",
      "duration_ms": 17000,
      "created_at": "2026-06-22T01:00:00Z"
    }
  ],
  "first_id": "srun_019f00112233445566778899aabbccdd",
  "last_id": "srun_019f00112233445566778899aabbccdd",
  "has_more": false
}

响应字段

字段类型说明
dataarray当前页的 Schedule Run 对象。
first_idstring | null当前页第一条 Run ID。
last_idstring | null当前页最后一条 Run ID。
has_moreboolean是否还有更多记录。
data[] 中每一项都是 Schedule Run 对象,字段与 Get Schedule Run 一致,包括 trigger_contexterrorpush_sinkpush_status 和执行时间字段。

错误

HTTPTypeCode触发条件
400invalid_request_errorinvalid_identityidentity_id 缺失或不合法。
400invalid_request_errorinvalid_pagination分页参数不合法。
401authentication_errorauthentication_requiredPAT 无效或已过期。

注意事项

  • Schedule Run 是独立资源。
  • completedfailedskipped 是终态。
  • push_status 表达 IM 流式投递状态,和主流程 status 相互独立。

相关

运行 Schedule

获取 Schedule Run