跳转到主要内容
POST /api/v1/forward/schedules/{schedule_id}/pause 暂停后 Schedule 不再按触发策略运行,也不允许手动运行。

请求头

Header是否必填说明
AuthorizationBearer <PAT>
Idempotency-Key有副作用请求可选的幂等键。

路径参数

参数类型是否必填说明
schedule_idstringForward Schedule ID。

示例请求

curl -s -X POST 'https://api.qoder.com/api/v1/forward/schedules/sched_019f00112233445566778899aabbccdd/pause' \
  -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": "paused",
  "paused_reason": {
    "type": "manual"
  },
  "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-22T12:00:00Z"
}

响应字段

字段类型说明
返回值object更新后的 Schedule 对象,status=paused

错误

HTTPTypeCode触发条件
404not_found_errorschedule_not_foundSchedule 不存在。
409invalid_request_errorschedule_archivedSchedule 已归档。
401authentication_errorauthentication_requiredPAT 无效或已过期。

注意事项

  • 请求体可以省略,也可以发送空 JSON 对象 {}
  • 当前仅公开手动暂停原因。

相关

恢复 Schedule

运行 Schedule