patchDeviceData
Apply RFC 6902 JSON Patch operations to the device’s data field.
Served by: management
Arguments
Section titled “Arguments”| Name | Type |
|---|---|
id |
ID! |
patches |
[JSONPatchInput!]! |
Returns
Section titled “Returns”Example
Section titled “Example”Applies RFC 6902 JSON Patch operations to the device’s data field. Only changed fields are modified; untouched fields are preserved.
mutation PatchDeviceData($id: ID!, $patches: [JSONPatchInput!]!) { patchDeviceData(id: $id, patches: $patches) { device { createdAt createdBy data dataTypeID dataTypeSlug deletedAt deletedBy id name tenantID updatedAt updatedBy } eventCount transactionID }}Variables
{ "id": "<device id to patch>", "patches": [ { "op": "REPLACE", "path": "/firmware", "value": "\"2.0\"" }, { "op": "REPLACE", "path": "/battery", "value": "95" } ]}