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

# Search authorized KARE entities by reference, title, name and bounded text.



## OpenAPI

````yaml /api/rs/openapi.json get /rs/search/v1/
openapi: 3.0.3
info:
  title: KARE API
  description: Backend API for the KARE platform
  version: dev
servers:
  - url: http://localhost:3000
    description: Local dev
security: []
tags:
  - name: better-auth
    description: >-
      Better Auth's own endpoints (sign-in, session, MFA, password) - generated
      from the audience's live config via `generateOpenAPISchema()`, not
      hand-written.
paths:
  /rs/search/v1/:
    get:
      tags:
        - search
      summary: >-
        Search authorized KARE entities by reference, title, name and bounded
        text.
      operationId: searchRSV1
      parameters:
        - schema:
            type: string
            minLength: 2
            maxLength: 200
          in: query
          name: whereText
          required: true
        - schema:
            maxItems: 8
            type: array
            items:
              type: string
              enum:
                - unit
                - technical_installation
                - equipment
                - anomaly
                - intervention
                - commission
                - building_work
                - logbook
          in: query
          name: types
          required: false
        - schema:
            maxItems: 50
            type: array
            items:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: whereUnitIds
          required: false
        - schema:
            maxItems: 50
            type: array
            items:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: whereTechnicalInstallationIds
          required: false
        - schema:
            anyOf:
              - type: boolean
              - type: string
            example: true
          in: query
          name: includeInactive
          required: false
          description: Filter value as a boolean
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        entityType:
                          type: string
                          enum:
                            - anomaly
                            - intervention
                            - commission
                            - unit
                            - technical_installation
                            - equipment
                            - building_work
                            - logbook
                            - provider
                            - contact
                            - contract
                            - document
                            - report
                            - routine
                            - member
                            - compliance
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        ref:
                          anyOf:
                            - type: string
                              maxLength: 40
                              pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                            - type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        title:
                          type: string
                          minLength: 1
                          maxLength: 300
                        subtitle:
                          nullable: true
                          type: string
                          maxLength: 240
                        status:
                          nullable: true
                          type: string
                          minLength: 1
                          maxLength: 64
                        interventionType:
                          type: string
                          enum:
                            - preventive
                            - curative
                            - troubleshooting
                            - audit
                            - exercise
                            - session
                            - qualification
                        lifecycle:
                          type: object
                          properties:
                            archived:
                              type: boolean
                            historized:
                              type: boolean
                          required:
                            - archived
                            - historized
                          additionalProperties: false
                        units:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              ref:
                                type: string
                                maxLength: 40
                                pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                              name:
                                type: string
                                minLength: 1
                                maxLength: 150
                            required:
                              - id
                              - ref
                              - name
                            additionalProperties: false
                        technicalInstallations:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              ref:
                                type: string
                                maxLength: 40
                                pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                              name:
                                type: string
                                minLength: 1
                                maxLength: 150
                            required:
                              - id
                              - ref
                              - name
                            additionalProperties: false
                        matchedField:
                          type: string
                          enum:
                            - ref
                            - title
                            - text
                            - related
                        outsideRequestedScope:
                          type: boolean
                      required:
                        - entityType
                        - id
                        - ref
                        - title
                        - subtitle
                        - status
                        - lifecycle
                        - units
                        - technicalInstallations
                        - matchedField
                        - outsideRequestedScope
                      additionalProperties: false
                  meta:
                    type: object
                    properties:
                      exactReference:
                        type: boolean
                      degraded:
                        type: boolean
                      truncatedTypes:
                        type: array
                        items:
                          type: string
                          enum:
                            - unit
                            - technical_installation
                            - equipment
                            - anomaly
                            - intervention
                            - commission
                            - building_work
                            - logbook
                    required:
                      - exactReference
                      - degraded
                      - truncatedTypes
                    additionalProperties: false
                required:
                  - data
                  - meta
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false

````