> ## 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.

# Get one rule



## OpenAPI

````yaml /api/rs/openapi.json get /rs/rules/v1/{id}
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/rules/v1/{id}:
    get:
      tags:
        - rules
      summary: Get one rule
      operationId: getRuleRSV1
      parameters:
        - schema:
            type: array
            items:
              type: string
              enum:
                - scopes
                - technical-installations
                - counts
                - actions-info
                - responsibles
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "scopes": Include equipment and user applicability scopes
                (non-deleted).

                - "technical-installations": Include the concerned technical
                installations (id, ref, name).

                - "counts": Adds `_count` of linked compliances, scopes,
                installations and responsibilities.

                - "actions-info": Adds `actions` { canBeUpdated, canBeArchived,
                canBeUnarchived, canBeDeleted }.

                - "responsibles": Adds `responsibles` - the users responsible
                for this element.
          in: query
          name: extend
          required: false
        - schema:
            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: path
          name: id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                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)$
                  name:
                    type: string
                    minLength: 1
                    maxLength: 200
                  description:
                    nullable: true
                    type: string
                    maxLength: 2000
                  type:
                    type: string
                    enum:
                      - preventive
                      - training_session
                      - training_exercise
                      - training_qualification
                  workflowType:
                    type: string
                    enum:
                      - calendar
                      - regulatory
                  complianceType:
                    type: string
                    enum:
                      - registry
                      - maintenance
                  rrule:
                    nullable: true
                    type: string
                    minLength: 1
                    maxLength: 500
                  rruleGap:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  validityDuration:
                    nullable: true
                    type: string
                    pattern: >-
                      ^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$
                  thresholdPercent:
                    nullable: true
                    type: integer
                    minimum: 0
                    maximum: 100
                  links:
                    nullable: true
                    type: object
                    additionalProperties: {}
                  providerTypes:
                    type: array
                    items:
                      type: string
                      enum:
                        - qualified_technician
                        - approved_organization
                        - training_provider
                  siteScopes:
                    type: array
                    items:
                      type: object
                      properties:
                        classifications:
                          type: array
                          items:
                            type: string
                            enum:
                              - erp
                              - ert
                              - igh
                              - icpe
                              - hab
                              - other
                        categories:
                          type: array
                          items:
                            type: string
                            enum:
                              - '1'
                              - '2'
                              - '3'
                              - '4'
                              - '5'
                        activityTypes:
                          type: array
                          items:
                            type: string
                            enum:
                              - J
                              - L
                              - M
                              - 'N'
                              - O
                              - P
                              - R
                              - S
                              - T
                              - U
                              - V
                              - W
                              - X
                              - 'Y'
                              - PA
                              - CTS
                              - SG
                              - OA
                              - REF
                              - PS
                              - GHA
                              - GHO
                              - GHR
                              - GHS
                              - GHTC
                              - GHU
                              - GHW1
                              - GHW2
                              - GHZ
                              - ITGH
                        privateCapacity:
                          type: object
                          properties:
                            operator:
                              type: string
                              enum:
                                - '>'
                                - '>='
                                - <
                                - <=
                                - '='
                            value:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                          required:
                            - operator
                            - value
                          additionalProperties: false
                      additionalProperties: false
                  formTemplateId:
                    nullable: true
                    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)$
                  libraryRuleId:
                    nullable: true
                    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)$
                  libraryVersion:
                    nullable: true
                    type: integer
                    minimum: 0
                    exclusiveMinimum: true
                    maximum: 9007199254740991
                  mainTechnicalInstallationId:
                    nullable: true
                    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)$
                  archivedAt:
                    nullable: true
                    type: string
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  equipmentScopes:
                    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)$
                        specificationValues:
                          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)$
                              name:
                                type: string
                                minLength: 1
                                maxLength: 100
                            required:
                              - id
                              - name
                            additionalProperties: false
                      required:
                        - id
                        - specificationValues
                      additionalProperties: false
                  userScopes:
                    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)$
                        professions:
                          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)$
                              name:
                                type: string
                                minLength: 1
                                maxLength: 100
                            required:
                              - id
                              - name
                            additionalProperties: false
                        diplomaTitles:
                          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)$
                              name:
                                type: string
                                minLength: 1
                                maxLength: 100
                            required:
                              - id
                              - name
                            additionalProperties: false
                      required:
                        - id
                        - professions
                        - diplomaTitles
                      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
                  _count:
                    type: object
                    properties:
                      compliances:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      equipmentScopes:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      userScopes:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      technicalInstallations:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      responsibilities:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - compliances
                      - equipmentScopes
                      - userScopes
                      - technicalInstallations
                      - responsibilities
                    additionalProperties: false
                  actions:
                    type: object
                    properties:
                      canBeUpdated:
                        type: boolean
                      canBeArchived:
                        type: boolean
                      canBeUnarchived:
                        type: boolean
                      canBeDeleted:
                        type: boolean
                    required:
                      - canBeUpdated
                      - canBeArchived
                      - canBeUnarchived
                      - canBeDeleted
                    additionalProperties: false
                  responsibles:
                    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)$
                        name:
                          type: string
                        email:
                          nullable: true
                          type: string
                      required:
                        - id
                        - name
                        - email
                      additionalProperties: false
                required:
                  - id
                  - name
                  - description
                  - type
                  - workflowType
                  - complianceType
                  - rrule
                  - rruleGap
                  - validityDuration
                  - thresholdPercent
                  - links
                  - providerTypes
                  - siteScopes
                  - formTemplateId
                  - libraryRuleId
                  - libraryVersion
                  - mainTechnicalInstallationId
                  - archivedAt
                  - createdAt
                  - updatedAt
                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

````