---
title: "get a role by id"
method: GET
path: "/api/v1/roles/{id}"
tags: ["role"]
---

# get a role by id

`GET /api/v1/roles/{id}`

This can only be done by a logged in user who has the required privileges.

## Path parameters

- `id` string, required

## Response `200`

Role data

- Role
  - `id` string
  - `name` string
  - `permissions` Permissions[]
  - `scope` string
  - `createdAt` string
  - `updatedAt` string
  - `isGlobal` boolean
  - `description` string

## Changes

- **2022-08-18** `016871a170fd` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2021-08-09** `214f3986034a` — 2 info
  - added the optional property `description` to the response with the `200` status
  - added the optional property `isGlobal` to the response with the `200` status
- **2021-08-06** `e3cb40d13d06` — 2 warning, 2 info
  - removed the optional property `isCreated` from the response with the `200` status
  - removed the optional property `isUpdated` from the response with the `200` status
  - added the optional property `createdAt` to the response with the `200` status
  - added the optional property `updatedAt` to the response with the `200` status
- **2021-08-06** `3c703fa51ebd` — 3 info
  - added the optional property `id` to the response with the `200` status
  - added the optional property `isCreated` to the response with the `200` status
  - added the optional property `isUpdated` to the response with the `200` status
- **2021-08-06** `e366ae458db2` — 1 warning, 1 info
  - removed the optional property `description` from the response with the `200` status
  - added the optional property `scope` to the response with the `200` status

[Full history](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/changes/api/v1/roles/:id/get.md)

---

[API](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih.md) · [All operations](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintegrationhub/iam-api-for-oih/revisions/016871a170fd/schema)
