---
title: "List roles"
method: GET
path: "/v1/roles"
tags: ["Security"]
---

# List roles

`GET /v1/roles`

List roles. Optional: filter based on role name and principal.

## Query parameters

- `filter.name_prefix` string
- `filter.name_contains` string
- `filter.principal` string
- `page_size` integer
- `page_token` string

## Response `200`

OK

- ListRolesResponse — ListRolesResponse is the response for ListRoles.
  - `next_page_token` string — Token to retrieve the next page.
  - `roles` Role[] — The roles in the system.
    - `name` string — The name of the role.

## Other responses

- `401` — Unauthenticated.
- `500` — Internal Server Error. Reach out to support.
- `default` — An unexpected error response.

---

[API](https://skmtc.dev/redpanda-data/apis/redpanda-cloud-data-plane-api.md) · [All operations](https://skmtc.dev/redpanda-data/apis/redpanda-cloud-data-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/redpanda-data/redpanda-cloud-data-plane-api/revisions/7eef0bcc42e7/schema)
