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

# List workspace roles



## OpenAPI

````yaml /openapi.yaml get /workspace_roles
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /workspace_roles:
    get:
      tags:
        - WorkspaceRole
      summary: List workspace roles
      operationId: workspace_roles#index
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
        - name: filter[slug]
          in: query
          required: false
          schema:
            type: string
        - name: filter[name]
          in: query
          required: false
          schema:
            type: string
        - name: filter[ids][]
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/workspace_role'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    workspace_role:
      type: object
      properties:
        id:
          type: integer
        slug:
          type: string
        name:
          type: string
        position:
          type: integer
        permissions:
          type: object
        field_access:
          type: object
          description: >-
            Per-column restrictions of the role. Only restricted columns are
            listed (hidden or view); an unlisted column is editable. Always
            empty for the owner role.
          properties:
            item_fields:
              type: object
              description: Item field slug => hidden | view
              additionalProperties:
                type: string
                enum:
                  - hidden
                  - view
            baseline_fields:
              type: object
              description: >-
                Baseline field => hidden | view. Fields: identifier, name,
                category, package_section, description, unit_type, supplier,
                image, quantity, unit_cost_price, cost_price, client_price
                (identifier, category and package_section can't be hidden).
              additionalProperties:
                type: string
                enum:
                  - hidden
                  - view
          required:
            - item_fields
            - baseline_fields
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.