# List Roles

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /be/v1/roles:
    get:
      summary: List Roles
      deprecated: false
      description: >-
        This endpoint allows you to list the details of all roles of your
        organiztion on the ROCKIT Edge.


        ### Required Permissions


        `roles.read`


        See [Roles](https://edge.api.cloud.rockitplay.com/roles-3618377f0.md)
        for more details.
      tags:
        - ROCKIT Edge - Backend API/Roles
      parameters:
        - name: offset
          in: query
          description: 'Pagination offset. '
          required: false
          example: 0
          schema:
            type: integer
            minimum: 0
        - name: limit
          in: query
          description: Pagination limit.
          required: false
          example: 10
          schema:
            type: integer
            minimum: 1
            default: 10
        - name: fields[]
          in: query
          description: >-
            Comma-separated list of fields to include in the response. Supported
            fields are: name.
          required: false
          example:
            - name
          schema:
            type: array
            items:
              type: string
        - name: name
          in: query
          description: Filter by app name (supports partial matches, case sensitive).
          required: false
          example: example_app
          schema:
            type: string
        - name: processing
          in: query
          description: Filter by processing status.
          required: false
          example: 'true'
          schema:
            type: boolean
        - name: exporting
          in: query
          description: Filter by exporting status.
          required: false
          example: 'true'
          schema:
            type: boolean
        - name: order[]
          in: query
          description: >-
            Sorting order. Supported fields for sorting:
            name,label,created,updated. +/- for Ascending/Descending (no +/-
            results in ascending order)
          required: false
          example: '-updated'
          schema:
            type: array
            items:
              type: string
        - name: Authorization
          in: header
          description: >-
            Use the access token obtained from [`POST
            /be/v1/login`](https://edge.api.cloud.rockitplay.com/user-login-org-11611254e0.md)
            or [`POST
            /be/v1/refresh`](https://edge.api.cloud.rockitplay.com/refresh-11630082e0.md)
            as Bearer token. <br>Mutually excluded with `x-rockit-api-key`.
          required: true
          example: Bearer {{_edge_org_admin_access_token}}
          schema:
            type: string
        - name: x-rockit-tenant
          in: header
          description: >-
            Unique and immutable tenancy identifier obtained from the ROCKIT
            Edge administrator. <br>Requires `x-rockit-username`,
            `x-rockit-orgname` and `x-rockit-api-key`.
          required: true
          example: '{{EDGE_TENANT_NAME}}'
          schema:
            type: string
        - name: x-rockit-orgname
          in: header
          description: >-
            Unique and immutable organization identifier obtained from the
            ROCKIT Edge administrator. <br>Requires `x-rockit-tenant`,
            `x-rockit-username` and `x-rockit-api-key`.
          required: true
          example: '{{EDGE_ORG_NAME}}'
          schema:
            type: string
        - name: x-rockit-username
          in: header
          description: >
            Unique and immutable username which is associated with the apikey.
            <br>Requires `x-rockit-tenant`, `x-rockit-orgname` and
            `x-rockit-api-key`.
          required: true
          example: adminPrincipal
          schema:
            type: string
        - name: x-rockit-api-key
          in: header
          description: >-
            Unique and immutable apikey which is associated with an machine
            user. <br>Mutually excluded with `Authorization` header. Requires
            `x-rockit-tenant`, `x-rockit-username` and `x-rockit-orgname`.
          required: true
          example: '{{_adminPrincipal_apiKey}}'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the retrieval of the app list was
                      successful.
                  totalCount:
                    type: integer
                  roles:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                        orgName:
                          type: string
                        name:
                          type: string
                        perms:
                          type: object
                          properties:
                            apps:
                              type: integer
                            beUsers:
                              type: integer
                            bundles:
                              type: integer
                            consumption:
                              type: integer
                            dependencies:
                              type: integer
                            deployments:
                              type: integer
                            keys:
                              type: integer
                            orgs:
                              type: integer
                            roles:
                              type: integer
                            activities:
                              type: integer
                            sources:
                              type: integer
                            subscriptions:
                              type: integer
                            tasks:
                              type: integer
                            trainings:
                              type: integer
                          required:
                            - apps
                            - beUsers
                            - bundles
                            - consumption
                            - dependencies
                            - deployments
                            - keys
                            - orgs
                            - roles
                            - activities
                            - sources
                            - subscriptions
                            - tasks
                            - trainings
                          x-apidog-orders:
                            - apps
                            - beUsers
                            - bundles
                            - consumption
                            - dependencies
                            - deployments
                            - keys
                            - orgs
                            - roles
                            - activities
                            - sources
                            - subscriptions
                            - tasks
                            - trainings
                          x-apidog-ignore-properties: []
                        nUsers:
                          type: integer
                      required:
                        - _id
                        - orgName
                        - name
                        - perms
                        - nUsers
                      x-apidog-orders:
                        - _id
                        - orgName
                        - name
                        - perms
                        - nUsers
                      x-apidog-ignore-properties: []
                required:
                  - status
                  - totalCount
                  - roles
                x-apidog-orders:
                  - status
                  - totalCount
                  - roles
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Success
                  value:
                    status: success
                    totalCount: 2
                    roles:
                      - _id: 67f3ea103a94ce31ce20ce50
                        orgName: KuhlmannOrg
                        name: Administrators
                        perms:
                          apps: 15
                          beUsers: 15
                          bundles: 31
                          consumption: 2
                          dependencies: 15
                          deployments: 15
                          keys: 15
                          orgs: 15
                          roles: 15
                          sources: 15
                          subscriptions: 15
                          tasks: 31
                          trainings: 6
                        nUsers: 9
                      - _id: 681a14514752913f25d9af12
                        orgName: KuhlmannOrg
                        name: exampleRole
                        perms:
                          apps: 12
                          beUsers: 7
                          bundles: 11
                          consumption: 2
                          dependencies: 4
                          deployments: 11
                          keys: 15
                          orgs: 0
                          roles: 9
                          sources: 8
                          subscriptions: 4
                          tasks: 31
                          trainings: 3
                        nUsers: 0
                '2':
                  summary: '400: missing-param'
                  value:
                    status: failed
                    error: missing-param
                    message: x-rockit-beauth-token missing
                    detail: header parameter x-rockit-beauth-token is required
                '3':
                  summary: '401: token-expired'
                  value:
                    status: failed
                    error: token-expired
                    message: expired token
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Reflects that the creation failed due to one or more
                      invalid or missing parameters in the request.
                  error:
                    type: string
                    description: Contains an error identifier.  (e.g., "invalid-param")
                  message:
                    type: string
                    description: >-
                      Explains the nature of the invalid input (for example,
                      "name invalid").
                  detail:
                    type: string
                    description: >-
                      Offers further context on the error. (e.g., expected
                      pattern for the organization name)
                x-apidog-orders:
                  - 01JQNHHRE76CZKMR2M3NAY6PZN
                required:
                  - status
                  - error
                  - message
                  - detail
                x-apidog-refs:
                  01JQNHHRE76CZKMR2M3NAY6PZN:
                    $ref: '#/components/schemas/Invalid%20Param'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
                  - detail
          headers: {}
          x-apidog-name: '400: missing-param'
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the organization creation request was
                      rejected because of authentication problems.
                  error:
                    type: string
                    description: Contains an error identifier. (e.g."unauthorized")
                  message:
                    type: string
                    description: >-
                      Provides details such as "invalid token" to help diagnose
                      the failure.
                x-apidog-orders:
                  - 01JQNHJ2BTGCK0EW9TNVMZT5FB
                required:
                  - status
                  - error
                  - message
                x-apidog-refs:
                  01JQNHJ2BTGCK0EW9TNVMZT5FB:
                    $ref: '#/components/schemas/unauthorized'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
          headers: {}
          x-apidog-name: '401: token-expired'
      security: []
      x-apidog-folder: ROCKIT Edge - Backend API/Roles
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/732774/apis/api-16569595-run
components:
  schemas:
    Invalid Param:
      type: object
      properties:
        status:
          type: string
          description: >-
            Reflects that the creation failed due to one or more invalid or
            missing parameters in the request.
        error:
          type: string
          description: Contains an error identifier.  (e.g., "invalid-param")
        message:
          type: string
          description: >-
            Explains the nature of the invalid input (for example, "name
            invalid").
        detail:
          type: string
          description: >-
            Offers further context on the error. (e.g., expected pattern for the
            organization name)
      required:
        - status
        - error
        - message
        - detail
      x-apidog-orders:
        - status
        - error
        - message
        - detail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    unauthorized:
      type: object
      properties:
        status:
          type: string
          description: >-
            Indicates that the organization creation request was rejected
            because of authentication problems.
        error:
          type: string
          description: Contains an error identifier. (e.g."unauthorized")
        message:
          type: string
          description: >-
            Provides details such as "invalid token" to help diagnose the
            failure.
      required:
        - status
        - error
        - message
      x-apidog-orders:
        - status
        - error
        - message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    Bearer token:
      type: bearer
      scheme: bearer
      description: >-
        Enter your Access Token. You can obtain this by calling the /be/v1/login
        endpoint. Use the Refresh token to get a new Access token when it
        expires.
servers:
  - url: https://Example-Server.com
    description: Default
security: []

```
