跳转到主要内容
GET /api/v1/forward/schedules 返回 Schedule 配置记录;归档 Schedule 默认不返回。

请求头

Header是否必填说明
AuthorizationBearer <PAT>

查询参数

参数类型是否必填默认值说明
identity_idstring-Schedule 所属 Forward Identity ID。
template_idstring-按 Forward Template ID 过滤。
statusstring-activepaused 过滤。
include_archivedbooleanfalse是否包含已归档 Schedule。
limitinteger20分页大小,最大 100。
after_idstring-向后翻页游标。
before_idstring-向前翻页游标。

示例请求

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

响应字段

字段类型说明
dataarray当前页的完整 Schedule 对象。
first_idstring | null当前页第一条记录 ID。
last_idstring | null当前页最后一条记录 ID。
has_moreboolean是否还有更多记录。

错误

HTTPTypeCode触发条件
400invalid_request_errorinvalid_identityidentity_id 缺失或不合法。
400invalid_request_errorinvalid_pagination分页参数不合法。
401authentication_errorauthentication_requiredPAT 无效或已过期。

注意事项

  • 结果按创建时间倒序返回。
  • 归档记录仅在 include_archived=true 时返回。

相关

创建 Schedule

列出 Schedule Runs