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

# Get all users



## OpenAPI

````yaml api-reference/openapi.json get /api/user
openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://localhost:8080
    description: Generated server url
security: []
paths:
  /api/user:
    get:
      tags:
        - User
      summary: Get all users
      operationId: getAll_1
      parameters:
        - name: role
          in: query
          required: false
          schema:
            type: string
            enum:
              - farmer
              - receptionist
              - sprayer
              - admin
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagedModelUserDTO'
components:
  schemas:
    Pageable:
      type: object
      properties:
        page:
          minimum: 0
          type: integer
          format: int32
        size:
          minimum: 1
          type: integer
          format: int32
        sort:
          type: array
          items:
            type: string
    PagedModelUserDTO:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/UserDTO'
        page:
          $ref: '#/components/schemas/PageMetadata'
    UserDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        email:
          type: string
        fullName:
          type: string
        phoneNumber:
          type: string
        street:
          type: string
        city:
          type: string
        province:
          type: string
        postalCode:
          type: string
        expertise:
          type: string
          enum:
            - apprentice
            - adept
            - expert
        role:
          type: string
          enum:
            - farmer
            - receptionist
            - sprayer
            - admin
        active:
          type: boolean
    PageMetadata:
      type: object
      properties:
        size:
          type: integer
          format: int64
        number:
          type: integer
          format: int64
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int64

````