全部產品
Search
文件中心

Qoder CN 系列:列出 Schedule Runs

更新時間:Jul 02, 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 相互獨立。

相關