修改调度器
部分更新调度器的配置。
身份验证
需要身份验证。通过 X-API-Key 或 Authorization: Bearer 头部传递 API 密钥。
路径参数
| 参数 | 类型 | 描述 |
|---|---|---|
| id | string | 调度器的唯一标识符 |
请求体
1{
2 "display_name": "updated-scheduler-name"
3}
请求示例
1curl -X PATCH "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
2 -H "X-API-Key: YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "display_name": "updated-scheduler-name"
6 }'
响应示例
1HTTP/1.1 200 OK
2Content-Type: application/json
1{
2 "id": "sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
3 "display_name": "updated-scheduler-name",
4 "ready": true,
5 "scheduled": 5,
6 "inflight": 0,
7 "created_at": "2025-06-20T10:00:00Z",
8 "updated_at": "2025-06-21T09:15:00Z"
9}
错误代码
| 状态 | 代码 | 描述 |
|---|---|---|
| 400 | validation_error | 请求体无效 |
| 401 | unauthorized | 缺少或无效的 API 密钥 |
| 404 | not_found | 未找到调度器 |
| 500 | internal_error | 服务器内部错误 |
评论