---
title: "Perform a series of targeted update operations"
method: PATCH
path: "/v1/device/{deviceId}"
tags: ["Device"]
---

# Perform a series of targeted update operations

`PATCH /v1/device/{deviceId}`

Patch the properties of one or more devices by specifying JSON patch operations which should be applied to the device properties in accordance with RFC 6902. A user can only execute this call when is he is a member of an authorizing role such that this role has a monitors relation with monitorManagement rights. Alternatively, the user must be member of a set of roles with monitors relations for the specified device, such that the set of device properties which these relations allow to edit are a subset of the device properties which are specified in the current request.

## Path parameters

- `deviceId` union, required
  - integer
  - integer[]

## Query parameters

- `validate` boolean

## Headers

- `If-Unmodified-Since` string

## Request body

- union[] — The JSON patch operations
  - union
    - object
      - `op` 'add' | 'replace' | 'test', required
      - `path` string, required
      - `value` unknown, required
    - object
      - `op` 'remove', required
      - `path` string, required
    - object
      - `op` 'copy' | 'move', required
      - `path` string, required
      - `from` string, required

## Response `200`

The readable and editable properties of the device, as well as information regarding the editabilities of those properties and whether the user has monitorManagement rights for the device

- object
  - `device` union — The updated device
    - Def8
      - `id` integer, required — Id of the device
      - `lastUpdate` string, required — Last update of the device in server time, formatted as an ISO 8601 string
      - `properties` object, required
      - `userRights` object, required — An object specifying which device properties a user may view or edit
        - `propertyEditabilities` object, required
        - `monitorManagement` boolean, required
    - Def8[]
      - `id` integer, required — Id of the device
      - `lastUpdate` string, required — Last update of the device in server time, formatted as an ISO 8601 string
      - `properties` object, required
      - `userRights` object, required — An object specifying which device properties a user may view or edit
        - `propertyEditabilities` object, required
        - `monitorManagement` boolean, required

## Other responses

- `400` — Invalidly formatted body or query parameter
- `401` — Authentication required or token invalid
- `412` — At least one of the affected devices was updated after the specified time
- `422` — One of the specified operations could not be successfully executed

---

[API](https://skmtc.dev/eniris/apis/eniris-metadata-telemetry-query-api.md) · [All operations](https://skmtc.dev/eniris/apis/eniris-metadata-telemetry-query-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/eniris/eniris-metadata-telemetry-query-api/revisions/fe3723575e19/schema)
