POST /api/v1/cloud/environments/{environment_id}/work/{work_id}
Updates the string-only metadata map on a work item. This endpoint uses merge-patch semantics: string values upsert keys and null values delete keys.
Path parameters
| Parameter | Type | Description |
|---|---|---|
environment_id | string | Environment ID with the env_ prefix |
work_id | string | Work item ID with the work_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
metadata | object | No | Merge patch for work metadata. String values upsert keys; null deletes keys. Omit to return the current item unchanged |
Example request
Example response
HTTP 200 OKResponse fields
Returns the updated Work item object.Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Request body is not valid JSON |
| 400 | invalid_request_error | A metadata value is neither string nor null |
| 400 | invalid_request_error | The Environment is not self_hosted |
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized for this operation |
| 404 | not_found_error | Environment or work item not found |
Related
Cloud environment setup
Choose the container, network, and dependencies your agent runs in.