---
title: "Returns a list of all roles"
method: GET
path: "/roles"
tags: ["roles"]
---

# Returns a list of all roles

`GET /roles`

Returns a paginated list of all roles. By default all roles are returned, but a subset can be returned by providing offset and limit query parameters.

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

Successfully returned a json object containing a list of all roles

- object
  - `count` integer — The number of roles returned
  - `total_count` integer — The total number of roles
  - `offset` integer — The first row of resources to retrieve, starting at 0. Use this parameter as a pagination mechanism along with the limit parameter
  - `limit` integer — The number of items returned per request
  - `items` Role[] — A list of roles
    - `id` string — Unique id for a role
    - `role` string — Name of role
    - `permissions` PermissionString[] — A list of permissions associated with this role

## Other responses

- `400` — Invalid request, reasons can be one of the following: * query parameters incorrect offset provided * query parameters incorrect limit provided
- `403` — Unauthorised request, reason is: * Requestor does not have necessary permissions to access this resource
- `500` — Failed to process the request due to an internal error

---

[API](https://skmtc.net/office-of-national-statistics/apis/permissions-api.md) · [All operations](https://skmtc.net/office-of-national-statistics/apis/permissions-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/office-of-national-statistics/permissions-api/revisions/c0050251683f/schema)
