---
title: "Collect roles (replaced by POST /v1/role/query)"
method: GET
path: "/v1/role"
tags: ["Role"]
deprecated: true
---

# Collect roles (replaced by POST /v1/role/query)

`GET /v1/role`

> **Deprecated.**

Get all (or some of) the roles of which a user is a member (either directly or indirectly). The POST /v1/role/query is a preferable alternative, which can better handle complex filters.

## Query parameters

- `viewId` integer
- `id` integer[]
- `name` string[]
- `ancestorRoleId` integer[]
- `companyId` integer[]
- `userRights.roleManagement` boolean
- `userRights.userManagement` boolean
- `userRights.viewManagement` boolean
- `userRights.deviceManagement` boolean
- `userRights.reportManagement` boolean
- `userRights.alarmManagement` boolean

## Response `200`

The roles of which the user is a member and which match all specified filters

- object
  - `role` Def34[]
    - `id` integer, required — Role id
    - `name` string, required — Role name
    - `selfRights` Def26, required
      - `roleManagement` boolean, required — Indicates that the parent role has the right to attach the child role and its decendants to any other role.
      - `userManagement` boolean, required — Indicates that the parent role has the right to manage member relations for the child role and its decendants.
      - `viewManagement` boolean, required — Indicates that the parent role has the right to manage views relations for the child role and its decendants.
      - `deviceManagement` boolean, required — Indicates that the parent role has the right to manage monitors relations for the child role and its decendants.
      - `reportManagement` boolean, required — Indicates that the parent role has the right to manage "views report relations" for the child role and its decendants
      - `alarmManagement` boolean, required — Indicates that the parent role has the right to manage "alarm relations" for the child role and its decendants
    - `userRights` Def28, required
      - `roleManagement` boolean — Indicates that the parent role has the right to attach the child role and its decendants to any other role.
      - `userManagement` boolean — Indicates that the parent role has the right to manage member relations for the child role and its decendants.
      - `viewManagement` boolean — Indicates that the parent role has the right to manage views relations for the child role and its decendants.
      - `deviceManagement` boolean — Indicates that the parent role has the right to manage monitors relations for the child role and its decendants.
      - `reportManagement` boolean — Indicates that the parent role has the right to manage "views report relations" for the child role and its decendants
      - `alarmManagement` boolean — Indicates that the parent role has the right to manage "alarm relations" for the child role and its decendants

## Other responses

- `400` — Invalidly formatted query parameters
- `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)
