ワークアイテムを更新
POST/v1/environments/{environment_id}/work/{work_id}
マージセマンティクスでワークアイテムのメタデータを更新します。
このエンドポイントはClaude APIキーを受け入れます。環境キーおよびワークアイテムの secret は拒否されます。Claude Platform on AWSまたはClaude Models on Google Cloud (Anthropic managed)では、代わりにそのプラットフォームの認証情報を使用してください。
Path parameters
Headers
Body
Returns
Errors
Any method can also return the general HTTP errors.
Each code below is the value of error.details.error_code in the response body.
ワークアイテムを更新
curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2026-10-21' \
-H 'anthropic-beta: managed-agents-2026-04-01' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY" \
-d '{
"metadata": {
"foo": "string"
}
}'Response 200
{
"id": "id",
"acknowledged_at": "acknowledged_at",
"created_at": "created_at",
"data": {
"id": "id",
"type": "session"
},
"environment_id": "environment_id",
"latest_heartbeat_at": "latest_heartbeat_at",
"metadata": {
"foo": "string"
},
"secret": "secret",
"started_at": "started_at",
"state": "queued",
"stop_requested_at": "stop_requested_at",
"stopped_at": "stopped_at",
"type": "work"
}Returns Examples
Response 200
{
"id": "id",
"acknowledged_at": "acknowledged_at",
"created_at": "created_at",
"data": {
"id": "id",
"type": "session"
},
"environment_id": "environment_id",
"latest_heartbeat_at": "latest_heartbeat_at",
"metadata": {
"foo": "string"
},
"secret": "secret",
"started_at": "started_at",
"state": "queued",
"stop_requested_at": "stop_requested_at",
"stopped_at": "stopped_at",
"type": "work"
}