全部产品
Search
文档中心

Qoder CN 系列:列出 Schedule Runs

更新时间:Jul 14, 2026

分页列出 Schedule Run 执行记录。

请求头

Header

是否必填

说明

Authorization

Bearer <PAT>

查询参数

参数

类型

是否必填

默认值

说明

identity_id

string

-

Run 所属 Forward Identity ID。

schedule_id

string

-

按 Schedule ID 过滤。

status

string

-

pendingrunningcompletedfailedskipped 过滤。

trigger_type

string

-

schedulemanual 过滤。

has_error

boolean

-

是否只返回有错误或无错误的 Run。

limit

integer

20

分页大小,最大 100。

after_id

string

-

向后翻页游标。

before_id

string

-

向前翻页游标。

示例请求

curl -s -X GET 'https://api.qoder.com.cn/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
}

响应字段

字段

类型

说明

data

array

当前页的 Schedule Run 对象。

first_id

string|null

当前页第一条 Run ID。

last_id

string|null

当前页最后一条 Run ID。

has_more

boolean

是否还有更多记录。

data[] 中每一项都是 Schedule Run 对象,字段与 Get Schedule Run 一致,包括 trigger_contexterrorpush_sinkpush_status 和执行时间字段。

错误

HTTP

Type

Code

触发条件

400

invalid_request_error

invalid_identity

identity_id 缺失或不合法。

400

invalid_request_error

invalid_pagination

分页参数不合法。

401

authentication_error

authentication_required

PAT 无效或已过期。

备注

  • Schedule Run 是独立资源。

  • completedfailedskipped 是终态。

  • push_status 表达 IM 流式投递状态,和主流程 status 相互独立。

相关