分页列出某个 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时返回。