---
title: "Get permission sets"
method: GET
path: "/api/v2/roles"
tags: ["Permission Sets"]
---

# Get permission sets

`GET /api/v2/roles`

List all roles.

## Query parameters

- `sort` string[]
- `filter` union — Filter schema for `role` list endpoints — pass a single condition or a logical group.
  - FilterRole — Filter parameters for roles.
    - `permissions` union — Filter by permission (text search).
      - Permissions — unresolved $ref
      - object — Filter using explicit operator syntax.
        - `contains` Permissions — unresolved $ref
        - `not_eq` Permissions — unresolved $ref
        - `not_contain` Permissions — unresolved $ref
        - `eq` Permissions — unresolved $ref
    - `active_agents_count` union — Filter by the number of active agent (bot) users assigned this role.
      - object — Object form with operator key.
        - `contains` ActiveAgentsCount — unresolved $ref
        - `not_eq` ActiveAgentsCount — unresolved $ref
        - `eq` ActiveAgentsCount — unresolved $ref
        - `not_contain` ActiveAgentsCount — unresolved $ref
      - ActiveAgentsCount — unresolved $ref
    - `name` union — Filter by role name (text search).
      - object — Filter using explicit operator syntax.
        - `contains` Name — unresolved $ref
        - `not_eq` Name — unresolved $ref
        - `not_contain` Name — unresolved $ref
        - `eq` Name — unresolved $ref
      - Name — unresolved $ref
    - `inactive_users_count` union — Filter by the number of inactive human users assigned this role.
      - object — Object form with operator key.
        - `eq` InactiveUsersCount — unresolved $ref
        - `not_contain` InactiveUsersCount — unresolved $ref
        - `contains` InactiveUsersCount — unresolved $ref
        - `not_eq` InactiveUsersCount — unresolved $ref
      - InactiveUsersCount — unresolved $ref
    - `inactive_agents_count` union — Filter by the number of inactive agent (bot) users assigned this role.
      - InactiveAgentsCount — unresolved $ref
      - object — Object form with operator key.
        - `contains` InactiveAgentsCount — unresolved $ref
        - `not_contain` InactiveAgentsCount — unresolved $ref
        - `eq` InactiveAgentsCount — unresolved $ref
        - `not_eq` InactiveAgentsCount — unresolved $ref
    - `base_role_id` union — Filter by base role ID.
      - object — Filter using explicit operator syntax.
        - `contains` BaseRoleId — unresolved $ref
        - `eq` BaseRoleId — unresolved $ref
        - `not_eq` BaseRoleId — unresolved $ref
        - `not_contain` BaseRoleId — unresolved $ref
      - BaseRoleId — unresolved $ref
    - `user_type_id` union — Filter by user type ID.
      - UserTypeId — unresolved $ref
      - object — Filter using explicit operator syntax.
        - `not_contain` UserTypeId — unresolved $ref
        - `not_eq` UserTypeId — unresolved $ref
        - `contains` UserTypeId — unresolved $ref
        - `eq` UserTypeId — unresolved $ref
    - `active_users_count` union — Filter by the number of active human users assigned this role.
      - object — Object form with operator key.
        - `not_eq` ActiveUsersCount — unresolved $ref
        - `eq` ActiveUsersCount — unresolved $ref
        - `not_contain` ActiveUsersCount — unresolved $ref
        - `contains` ActiveUsersCount — unresolved $ref
      - ActiveUsersCount — unresolved $ref
    - `id` union — Filter by ID.
      - object — Filter using explicit operator syntax.
        - `contains` Id — unresolved $ref
        - `eq` Id — unresolved $ref
        - `not_contain` Id — unresolved $ref
        - `not_eq` Id — unresolved $ref
      - Id — unresolved $ref
  - object — A logical filter group — combine multiple conditions with the `$op` operator.
    - `$op` 'or' | 'and', required — Logical operator combining conditions in this group. `or` matches records satisfying any condition; `and` requires all conditions to match.

## Headers

- `X-Organization-Id` string, required

## Response `200`

Collection role

---

[API](https://skmtc.net/productive/apis/api-documentation.md) · [All operations](https://skmtc.net/productive/apis/api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/productive/api-documentation/revisions/11e8576224b8/schema)
