Patch an item's data
patch_item_dataApply JSON Patch (RFC 6902) operations to an item's data, or to the value at pointer (operation paths are then relative to it). Best for surgical edits: replacing an array element, removing a field, appending with path "/list/-". All operations apply, or none. Operations that write over a guarded value (or one of its parents) are refused unless overwriteGuarded is set, and the API refuses test, copy and move from guarded values. Pass the etag you read as ifMatch. 1 request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | The item: its id or alias value (a deleted item only by id) | |
| list | Yes | The list: its id or pathName | |
| ifMatch | No | The etag you read the item with. The write only happens if nobody has changed the item since; otherwise it fails with ITEM_PRECONDITION_FAILED and nothing is written. Pass it whenever the write is based on something you read | |
| pointer | No | A JSON pointer (RFC 6901) into the item's data, e.g. /address/city or /scores/0. Leave out for the whole data | |
| operations | Yes | The operations, e.g. [{ "op": "replace", "path": "/status", "value": "done" }] | |
| returnData | No | Return the item's data after the write (default: metadata only) | |
| overwriteGuarded | No | Write even though it replaces values hidden by guard indexes, deleting them. Only if the user means to |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etag | Yes | ||
| item | Yes |