---
title: "Get Role API"
method: GET
path: "/authz2/v1/roles/{role_id}"
tags: ["esper_cloud_api_Roles"]
---

# Get Role API

`GET /authz2/v1/roles/{role_id}`

Retrieves the details of a specific custom RBAC role by its ID.

Use this endpoint to confirm a role's name, description, and type before updating it or assigning it to a user.

**About Get Role**

This endpoint returns the metadata for a single custom role — name, description, and role_type — identified by its UUID. It does not return the role's associated scopes; use GET /authz2/v1/roles/{role_id}/scopes to retrieve the permission set. This endpoint is useful for validating role details before making updates via PATCH /authz2/v1/roles/{role_id}.

**Key Fields (Response)**

id — the UUID of the role

name — the display name of the role

description — the human-readable description of the role's intended purpose

role_type — integer indicating the type of role

**Common Use Cases**

Confirming role details before assigning it to a user via PUT /authz2/v1/users/{user_id}

Verifying that a role's name and description are accurate before referencing it in documentation or automation

Retrieving role metadata as a precursor to updating it via PATCH /authz2/v1/roles/{role_id}

**Best Practices**

Use GET /authz2/v1/roles/ first if you don't have the role_id — this endpoint requires it as a path parameter

Pair this with GET /authz2/v1/roles/{role_id}/scopes to get a complete picture of what a role does before assigning it to users

**Workflow**

Obtain the role_id from GET /authz2/v1/roles/

Call GET /authz2/v1/roles/{role_id} to confirm the role's name and description

Proceed with user assignment or update as needed

## Path parameters

- `role_id` string, uuid, required

## Response `200`

Request Succeded

- EsperCloudApiRoleResponse
  - `id` string
  - `name` string
  - `description` string
  - `role_type` integer

## Other responses

- `400` — Bad request
- `401` — Unauthorized request

---

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