# List roles

**GET /v1/roles**

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


## Servers
- Data Plane API: https://{dataplane_api_subdomain}.cloud.redpanda.com (Data Plane API)


## Authentication methods
- Auth0


## Parameters


### Query parameters
- **filter.name_prefix** (string)
  Filter results only roles named with the prefix.
- **filter.name_contains** (string)
  Filter results to only roles with names which contain the string.
- **filter.principal** (string)
  Return only roles assigned to this principal. The principal must contain
  the principal type. For example: "User:jane" is a valid principal format.
- **page_size** (integer(int32))
  Page size.
- **page_token** (string)
  Value of the next_page_token field returned by the previous response.
  If not provided, the system assumes the first page is requested.


## Responses
### 200
OK

#### Body: application/json (object)
- **next_page_token** (string)
  Token to retrieve the next page.
- **roles** (array[object])
  The roles in the system.

### 401
Unauthenticated.

#### Body: application/json (object)
- **code** (string(int32))
  RPC status code, as described [here](https://github.com/googleapis/googleapis/blob/b4c238feaa1097c53798ed77035bbfeb7fc72e96/google/rpc/code.proto#L32).
- **details** (array[object])
  A list of messages that carries the error details.
- **message** (string)
  Detailed error message. No compatibility guarantees are given for the text contained in this message.

### 500
Internal Server Error. Reach out to support.

#### Body: application/json (object)
- **code** (string(int32))
  RPC status code, as described [here](https://github.com/googleapis/googleapis/blob/b4c238feaa1097c53798ed77035bbfeb7fc72e96/google/rpc/code.proto#L32).
- **details** (array[object])
  A list of messages that carries the error details.
- **message** (string)
  Detailed error message. No compatibility guarantees are given for the text contained in this message.

### default
An unexpected error response.

#### Body: application/json (object)
- **code** (string(int32))
  RPC status code, as described [here](https://github.com/googleapis/googleapis/blob/b4c238feaa1097c53798ed77035bbfeb7fc72e96/google/rpc/code.proto#L32).
- **details** (array[object])
  A list of messages that carries the error details.
- **message** (string)
  Detailed error message. No compatibility guarantees are given for the text contained in this message.


[Powered by Bump.sh](https://bump.sh)
