Skip to content
Pyck docs

You are reading the Dev docs (main @ e991a08). They can differ from the released product.Dev docs, not the release

Switch to LatestLatest

patchDeviceData

Apply RFC 6902 JSON Patch operations to the device’s data field.

Served by: management

Name Type
id ID!
patches [JSONPatchInput!]!

DeviceOutput!

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"
}
]
}