POST /v1/deployments/{id}
マージパッチセマンティクスで Deployment を更新します。リクエストボディに含まれるフィールドのみが変更され、省略されたフィールドは現在の値を保持します。
本エンドポイントは CMA との整合のため POST(PATCH ではなく) を使用します。指定されたフィールドのみが部分更新として適用されます。
パスパラメータ
| パラメータ | 型 | 説明 |
|---|
id | string | Deployment ID(dep_ プレフィックス) |
ヘッダー
| 名称 | 必須 | 値 |
|---|
Authorization | はい | Bearer $QODER_PAT |
Content-Type | はい | application/json |
リクエストボディ
すべてのフィールドは任意です。変更したいフィールドのみを含めてください。
| フィールド | 型 | 説明 |
|---|
name | string | 新しい名前(最大 256 文字) |
description | string | 新しい説明 |
agent | string or object | 新しい Agent 参照(文字列 ID または {id, type, version} オブジェクト) |
environment_id | string | 新しい Environment ID |
schedule | object | 更新後のスケジュール設定(すべてのサブフィールド type、expression、timezone を含む必要あり) |
initial_events | array | 新しい initial events 配列(1-50 個) |
resources | array | 更新後のリソース |
vault_ids | array | 更新後の vault ID |
metadata | object | マージパッチメタデータ(key→value で upsert、key→null で削除) |
リクエスト例
curl -X POST "https://api.qoder.com/api/v1/cloud/deployments/dep_019ec556114c78f8b60ee34fcb98bf59" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "api-doc-verification-deployment-v2",
"schedule": {
"type": "cron",
"expression": "30 9 * * 1-5",
"timezone": "Asia/Shanghai"
}
}'
レスポンス例
HTTP 200 OK
更新後の完全な Deployment オブジェクトを返します。
{
"agent": {
"id": "agent_019eb4d4a06d747c865d5800b9c57ae2",
"type": "agent",
"version": 1
},
"archived_at": null,
"created_at": "2026-06-14T08:53:32Z",
"description": "Deployment created for API documentation verification",
"environment_id": "env_019e64e01a137caf953ac2ac7b42ec5c",
"id": "dep_019ec556114c78f8b60ee34fcb98bf59",
"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,
"next_trigger_at": "2026-06-15T01:30:00Z",
"total_failures": 0,
"total_runs": 0
}
}
},
"name": "api-doc-verification-deployment-v2",
"paused_reason": null,
"resources": [],
"schedule": {
"expression": "30 9 * * 1-5",
"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": "active",
"type": "deployment",
"updated_at": "2026-06-14T08:54:05Z",
"vault_ids": []
}
エラー
| HTTP | type | 説明 |
|---|
| 400 | invalid_request_error | 無効なフィールド値、空の名前、無効な cron 式、または参照先 Agent/Environment がアーカイブ済み |
| 401 | authentication_error | PAT が無効または期限切れ |
| 404 | not_found_error | Deployment が存在しない |
完全なエラーエンベロープについては エラー を参照してください。
関連項目
Deployment の取得
ID を指定して単一の Deployment 詳細を取得します。
Deployment の一時停止
スケジュールされた実行を一時停止します。
Deployment のアーカイブ
Deployment をアーカイブして以後の実行を停止します。