Skip to content

patchDeviceLocationData

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

Served by: management

Name Type
id ID!
patches [JSONPatchInput!]!

DeviceLocationOutput!

Applies RFC 6902 JSON Patch operations to the device location assignment’s data field. Only changed fields are modified; untouched fields are preserved.

mutation PatchDeviceLocationData($id: ID!, $patches: [JSONPatchInput!]!) {
patchDeviceLocationData(id: $id, patches: $patches) {
DeviceLocation {
createdAt
createdBy
data
dataTypeID
dataTypeSlug
deletedAt
deletedBy
deviceID
id
locationID
tenantID
updatedAt
updatedBy
}
eventCount
transactionID
}
}

Variables

{
"id": "<device location id to patch>",
"patches": [
{
"op": "REPLACE",
"path": "/priority",
"value": "\"high\""
},
{
"op": "ADD",
"path": "/note",
"value": "\"Moved to urgent area\""
}
]
}