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



## OpenAPI

````yaml /api/rs/openapi.json get /rs/trainings/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/trainings/v1/{id}:
    get:
      tags:
        - trainings
      summary: Get one training
      operationId: getTrainingRSV1
      parameters:
        - schema:
            type: array
            items:
              type: string
              enum:
                - trained-users
                - assigned-to
                - created-by
                - units
                - actions-info
                - rules
                - counts
                - verification
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "trained-users": Named attendance roster (user id/name +
                status + proof) and count.

                - "assigned-to": Resolves the assigned user (via identity) or
                provider contact (id, name).

                - "created-by": Resolves the creator as `createdBy` (id, name).

                - "units": Resolves every unit the training concerns - through
                its compliances, its anomalies, or the units and equipments it
                directly targets.

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

                - "rules": Adds the rules the training answers for, deduplicated
                (`rule` when exactly one, `rules` list, `rulesCount`), each with
                its `rrule` periodicity.

                - "counts": Adds `_count` of the linked comments and
                attachments.

                - "verification": Resolves the verifying user as `verifiedBy`
                (id, name); `verifiedAt` is in the default shape.
          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)$
                  ref:
                    type: string
                    maxLength: 40
                    pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                  type:
                    type: string
                    enum:
                      - preventive
                      - curative
                      - troubleshooting
                      - audit
                      - exercise
                      - session
                      - qualification
                  status:
                    type: string
                    enum:
                      - draft
                      - to_be_scheduled
                      - scheduling_in_progress
                      - scheduled
                      - in_progress
                      - awaiting_report
                      - awaiting_proof
                      - awaiting_validation
                      - validated
                      - rejected
                  title:
                    nullable: true
                    type: string
                    minLength: 1
                    maxLength: 200
                  description:
                    nullable: true
                    type: string
                    maxLength: 2000
                  autoCreated:
                    type: boolean
                  creationStatus:
                    type: string
                    enum:
                      - scheduled
                      - done
                  isPlanned:
                    type: boolean
                  scheduledStart:
                    nullable: true
                    type: string
                    format: date-time
                  scheduledEnd:
                    nullable: true
                    type: string
                    format: date-time
                  actualStart:
                    nullable: true
                    type: string
                    format: date-time
                  actualEnd:
                    nullable: true
                    type: string
                    format: date-time
                  verifiedAt:
                    nullable: true
                    type: string
                    format: date-time
                  verifiedByUserId:
                    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)$
                  assignedContactId:
                    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)$
                  assignedUserId:
                    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)$
                  organizationId:
                    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)$
                  historizedAt:
                    nullable: true
                    type: string
                    format: date-time
                  archivedAt:
                    nullable: true
                    type: string
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  attendeeCount:
                    nullable: true
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  trainingProof:
                    nullable: true
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 255
                      mimeType:
                        type: string
                        minLength: 1
                        maxLength: 100
                      size:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 1073741824
                      downloadUrl:
                        type: string
                        format: uri
                    required:
                      - name
                      - mimeType
                      - size
                      - downloadUrl
                    additionalProperties: false
                  trainedUsers:
                    type: array
                    items:
                      type: object
                      properties:
                        userId:
                          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)$
                        attendanceStatus:
                          nullable: true
                          type: string
                          enum:
                            - present
                            - absent
                        attendanceProof:
                          nullable: true
                          type: object
                          properties:
                            name:
                              type: string
                              minLength: 1
                              maxLength: 255
                            mimeType:
                              type: string
                              minLength: 1
                              maxLength: 100
                            size:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                              maximum: 1073741824
                            downloadUrl:
                              type: string
                              format: uri
                          required:
                            - name
                            - mimeType
                            - size
                            - downloadUrl
                          additionalProperties: false
                        user:
                          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
                          required:
                            - id
                            - name
                          additionalProperties: false
                      required:
                        - userId
                        - attendanceStatus
                        - attendanceProof
                        - user
                      additionalProperties: false
                  trainedUsersCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  assignedUser:
                    nullable: true
                    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
                    required:
                      - id
                      - name
                    additionalProperties: false
                  assignedContact:
                    nullable: true
                    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: 150
                    required:
                      - id
                      - name
                    additionalProperties: false
                  createdBy:
                    nullable: true
                    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
                    required:
                      - id
                      - name
                    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
                  actions:
                    type: object
                    properties:
                      canBeUpdated:
                        type: boolean
                      canBeArchived:
                        type: boolean
                      canBeUnarchived:
                        type: boolean
                      canBeDeleted:
                        type: boolean
                    required:
                      - canBeUpdated
                      - canBeArchived
                      - canBeUnarchived
                      - canBeDeleted
                    additionalProperties: false
                  rule:
                    nullable: true
                    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
                      rrule:
                        nullable: true
                        type: string
                    required:
                      - id
                      - name
                      - rrule
                    additionalProperties: false
                  rules:
                    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
                        rrule:
                          nullable: true
                          type: string
                      required:
                        - id
                        - name
                        - rrule
                      additionalProperties: false
                  rulesCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  _count:
                    type: object
                    properties:
                      comments:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      attachments:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - comments
                      - attachments
                    additionalProperties: false
                  verifiedBy:
                    nullable: true
                    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
                    required:
                      - id
                      - name
                    additionalProperties: false
                required:
                  - id
                  - ref
                  - type
                  - status
                  - title
                  - description
                  - autoCreated
                  - creationStatus
                  - isPlanned
                  - scheduledStart
                  - scheduledEnd
                  - actualStart
                  - actualEnd
                  - verifiedAt
                  - verifiedByUserId
                  - assignedContactId
                  - assignedUserId
                  - organizationId
                  - historizedAt
                  - archivedAt
                  - createdAt
                  - updatedAt
                  - attendeeCount
                  - trainingProof
                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

````