---
title: "Get a single role"
method: GET
path: "/api/admin/roles/{roleId}"
tags: ["Users"]
---

# Get a single role

`GET /api/admin/roles/{roleId}`

**Enterprise feature**

Get a single role by role id

## Path parameters

- `roleId` string, required

## Response `200`

roleWithPermissionsSchema

- RoleWithPermissionsSchema — A read model for the role and permissions to allow Unleash to decide what actions a role holder is allowed to perform
  - `id` number, required — The role id
  - `type` string, required — A role can either be a global `root` role, or a `project` role or a `custom` project role or a custom global `root-custom` role
  - `name` string, required — The name of the role
  - `description` string — A more detailed description of the role and what use it's intended for
  - `permissions` AdminPermissionSchema[], required — A list of permissions assigned to this role
    - `id` integer, required — The identifier for this permission
    - `name` string, required — The name of this permission
    - `displayName` string, required — The name to display in listings of permissions
    - `type` string, required — What level this permission applies to. Either root, project or the name of the environment it applies to
    - `environment` string, nullable — Which environment this permission applies to

## Other responses

- `400` — The request data does not match what we expect.
- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `404` — The requested resource was not found.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/versions/b2c3116e633e/schema)
