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

# List roles

`GET /roles`

## Query parameters

- `pageSize` number
- `page` number
- `sortBy` string
- `name__exact` string
- `name__contains` string

## Headers

- `organization` string, required

## Response `200`

Successful resopnse

- object — A paginated list of Roles
  - `page` integer — The current page
  - `pageSize` integer — The number of objects per page
  - `total` integer — The total number of objects in the response
  - `pageCount` integer — The total number of pages
  - `pageNumberIsGood` boolean — Page number is valid.
  - `hasPreviousPage` boolean — There is a previous page.
  - `hasNextPage` boolean — There is a next page.
  - `isFirstPage` boolean — This is the first page.
  - `isLastPage` boolean — This is the last page.
  - `rows` RolesDto[] — **Roles**
    - `id` string, required — Role ID
    - `permissions` PermissionDto[], required — Permissions
      - `id` string, required — Permission ID
      - `name` string, required — Permission name
      - `description` string, required — Permission description
      - `subject` SubjectDto, required
        - `id` string — Subject ID
        - `fields` string[] — Fields
        - `entity` string — Entity identified by this subject
      - `actions` string[], required — The actions that this permission allows to be performed on the subject
    - `name` string, required — Role name
    - `description` string, required — Role description
    - `public` boolean, required — If **True**, this role is available to all user, including those that are not logged it.
    - `default` boolean, required — If **True**, this role is assigned to any newly created organization.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/fanhero/apis/tenant-endpoints.md) · [All operations](https://skmtc.net/fanhero/apis/tenant-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fanhero/tenant-endpoints/versions/8e7584c449dc/schema)
