分頁列出某個 Identity 下的 Forward Schedule。
GET /api/v1/forward/schedules
返回 Schedule 配置記錄;歸檔 Schedule 預設不返回。
要求標頭
|
Header |
是否必填 |
說明 |
|
Authorization |
是 |
|
查詢參數
|
參數 |
類型 |
是否必填 |
預設值 |
說明 |
|
identity_id |
string |
是 |
- |
Schedule 所屬 Forward Identity ID。 |
|
template_id |
string |
否 |
- |
按 Forward Template ID 過濾。 |
|
status |
string |
否 |
- |
按 |
|
include_archived |
boolean |
否 |
false |
是否包含已歸檔 Schedule。 |
|
limit |
integer |
否 |
20 |
分頁大小,最大 100。 |
|
after_id |
string |
否 |
- |
向後翻頁遊標。 |
|
before_id |
string |
否 |
- |
向前翻頁遊標。 |
樣本請求
curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/schedules' \
-H "Authorization: Bearer $QODER_PAT"
樣本響應
HTTP 200 OK
{
"data": [
{
"id": "sched_019f00112233445566778899aabbccdd",
"identity_id": "idn_019eabc123",
"template_id": "tmpl_support",
"name": "Daily tech brief",
"description": "Generate a daily technology news summary",
"status": "active",
"initial_events": [
{
"type": "user.message",
"content": "Summarize current technology news in five bullet points."
}
],
"execution": {
"session_mode": "new_session",
"max_concurrent_runs": 1,
"max_attempts": 1,
"timeout_ms": 300000
},
"trigger_policy": {
"type": "cron",
"expression": "0 9 * * *",
"timezone": "Asia/Shanghai",
"upcoming_runs_at": [
"2026-06-23T01:00:00Z"
]
},
"environment_id": "env_019e64e01a137caf953ac2ac7b42ec5c",
"sinks": [],
"metadata": {},
"created_at": "2026-06-22T10:00:00Z",
"updated_at": "2026-06-22T10:00:00Z"
}
],
"first_id": "sched_019f00112233445566778899aabbccdd",
"last_id": "sched_019f00112233445566778899aabbccdd",
"has_more": false
}
響應欄位
|
欄位 |
類型 |
說明 |
|
data |
array |
當前頁的完整 Schedule 對象。 |
|
first_id |
string | null |
當前頁第一條記錄 ID。 |
|
last_id |
string | null |
當前頁最後一條記錄 ID。 |
|
has_more |
boolean |
是否還有更多記錄。 |
錯誤
|
HTTP |
Type |
Code |
觸發條件 |
|
400 |
|
|
|
|
400 |
|
|
分頁參數不合法。 |
|
401 |
|
|
PAT 無效或已到期。 |
注意事項
-
結果按建立時間倒序返回。
-
歸檔記錄僅在
include_archived=true時返回。