歸檔一個 Forward Schedule。
POST /api/v1/forward/schedules/{schedule_id}/archive
歸檔不會刪除歷史 Schedule Run。歸檔後不再調度,也不允許更新、暫停、恢複或手動執行。
要求標頭
Header | 是否必填 | 說明 |
Authorization | 是 |
|
Idempotency-Key | 否 | 有副作用請求可選的等冪鍵。 |
路徑參數
參數 | 類型 | 是否必填 | 說明 |
| string | 是 | Forward Schedule ID。 |
樣本請求
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/schedules/sched_019f00112233445566778899aabbccdd/archive' \
-H "Authorization: Bearer $QODER_PAT"
樣本響應
HTTP 200 OK
{
"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": {},
"archived_at": "2026-06-22T12:00:00Z",
"created_at": "2026-06-22T10:00:00Z",
"updated_at": "2026-06-22T12:00:00Z"
}
響應欄位
欄位 | 類型 | 說明 |
傳回值 | object | 歸檔後的 Schedule 對象, |
錯誤
HTTP | Type | Code | 觸發條件 |
404 |
|
| Schedule 不存在。 |
409 |
|
| Schedule 已歸檔。 |
401 |
|
| PAT 無效或已到期。 |
備忘
歸檔是 Schedule 的生命週期終態。
歷史 Schedule Run 仍可查詢。