暂停 Deployment,停止定时运行。
路径参数
|
参数 |
类型 |
说明 |
|
|
string |
Deployment ID( |
请求头
|
头部 |
必选 |
说明 |
|
|
是 |
|
|
|
是 |
|
请求体
无需请求体。
示例请求
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/deployments/dep_019ec55a2b687b3f94eee77dd77e4b2a/pause" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json"
示例响应
HTTP 200 OK
返回状态已更新的完整 Deployment 对象。
{
"agent": {
"id": "agent_019ebb21ef8e7df6a559052c94875160",
"type": "agent",
"version": 1
},
"archived_at": null,
"created_at": "2026-06-14T08:58:01Z",
"description": "Deployment created for API documentation verification",
"environment_id": "env_019e49a1780171daac1e6b01f290ac2b",
"id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
"initial_events": [
{
"content": "Generate today's status report",
"type": "user.message"
}
],
"metadata": {
"cas_config": {
"config": {
"max_concurrent": 1,
"max_retries": 0,
"timeout_ms": 300000
},
"session_strategy": "new_session",
"stats": {
"consecutive_failures": 0,
"last_triggered_at": "2026-06-14T08:58:17Z",
"next_trigger_at": "2026-06-15T01:30:00Z",
"total_failures": 0,
"total_runs": 1
}
}
},
"name": "api-doc-verification-deployment-v2",
"paused_reason": {
"type": "manual"
},
"resources": [],
"schedule": {
"expression": "30 9 * * 1-5",
"last_run_at": "2026-06-14T08:58:17Z",
"timezone": "Asia/Shanghai",
"type": "cron",
"upcoming_runs_at": [
"2026-06-15T01:30:00Z",
"2026-06-16T01:30:00Z",
"2026-06-17T01:30:00Z",
"2026-06-18T01:30:00Z",
"2026-06-19T01:30:00Z"
]
},
"status": "paused",
"type": "deployment",
"updated_at": "2026-06-14T08:58:22Z",
"vault_ids": []
}
错误码
|
HTTP |
type |
触发条件 |
|
401 |
|
PAT 无效或过期 |
|
404 |
|
Deployment 不存在 |
|
409 |
|
Deployment 已经处于暂停状态 |
完整错误信封说明详见错误参考。
该文章对您有帮助吗?