> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigcapital.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all roles



## OpenAPI

````yaml api-reference/openapi.json get /api/roles
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/roles:
    get:
      tags:
        - Roles
      summary: Get all roles
      operationId: RolesController_getRoles
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of all roles
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleResponseDto'
components:
  schemas:
    RoleResponseDto:
      type: object
      properties:
        id:
          type: number
          example: 1
          description: Unique identifier of the role
        slug:
          type: string
          example: admin
          description: The slug of the role
        name:
          type: string
          example: Administrator
          description: The name of the role
        description:
          type: string
          example: Administrator role with all permissions
          description: The description of the role
        predefined:
          type: boolean
          example: false
          description: Indicates if the role is predefined
        permissions:
          description: List of permissions associated with the role
          example:
            - ability: read
              subject: item
              value: true
            - ability: edit
              subject: item
              value: false
          type: array
          items:
            $ref: '#/components/schemas/RolePermissionResponseDto'
      required:
        - id
        - slug
        - name
        - description
        - predefined
        - permissions
    RolePermissionResponseDto:
      type: object
      properties:
        ability:
          type: string
          example: read
          description: The action/ability of the permission
        subject:
          type: string
          example: item
          description: The subject of the permission
        value:
          type: boolean
          example: true
          description: The value of the permission
      required:
        - ability
        - subject
        - value

````