---
title: "Collect monitors relations"
method: POST
path: "/v1/role/{roleId}/monitors/query"
tags: ["Monitors"]
---

# Collect monitors relations

`POST /v1/role/{roleId}/monitors/query`

Get all (or some of) the monitors relations which start from a role of which a user is a member (either directly or indirectly).

## Path parameters

- `roleId` union, required
  - integer
  - integer[]
  - '*'

## Request body

- object — Some filters, each of which must be valid for all returned monitors relations
  - `filter` object — Only return those monitors relations which match each of the specified filters
    - `id` integer[] — Only return monitors relations with one of the specified ids
    - `roleId` integer[] — Only return monitors relations with one of the specified role ids
    - `deviceId` integer[] — Only return monitors relations with one of the specified device ids

## Response `200`

The monitors relations which start from roles of which the user is a member and which match all the specified filters

- object
  - `monitors` Def32[]
    - `id` integer, required — Id of the monitors relation
    - `roleId` integer, required — Id of the role which monitors a device via the monitors relation
    - `deviceId` integer, required — Id of the device which is monitored via the monitors relation
    - `monitorManagement` boolean, required — Indicates whether the role has the right to create new monitors relations to the monitored device. If true, the role may read and edit any device property.
    - `reads` string[], required — A list of device properties which may be read by the role monitoring the device
    - `edits` string[], required — A list of device properties which may be both read and edited by the role monitoring the device

## Other responses

- `400` — Invalidly formatted body
- `401` — Authentication required or token invalid

---

[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)
