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

# Read the organization's audit activity (compliance feed)



## OpenAPI

````yaml /api/rs/openapi.json get /rs/audit/v1/activity
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/audit/v1/activity:
    get:
      tags:
        - audit
      summary: Read the organization's audit activity (compliance feed)
      operationId: listActivityRSV1
      parameters:
        - schema:
            default: 1
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 9007199254740991
          in: query
          name: page
          required: false
        - schema:
            default: 50
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 1000
          in: query
          name: pageSize
          required: false
        - schema:
            example: true
            anyOf:
              - type: boolean
          in: query
          name: countOnly
          required: false
          description: >-
            When true, answers `totalCount` with an empty `data`: the rows are
            never read, so no extend is selected and no transform runs. For a
            badge or a counter.
        - schema:
            type: array
            items:
              type: string
              enum:
                - detail
                - request
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "detail": Field diff, action payload and event metadata.

                - "request": Request provenance: ip, user agent, request and
                correlation ids.
          in: query
          name: extend
          required: false
        - schema:
            type: array
            items:
              type: object
              properties:
                field:
                  type: string
                  enum:
                    - createdAt
                    - action
                  description: >-
                    OrderBy options (JSON-encoded array, e.g.
                    `?orderBy=[{"field":"name","direction":"asc"}]`):

                    - "createdAt": Order by event date.

                    - "action": Order by action key.
                direction:
                  type: string
                  enum:
                    - asc
                    - desc
                  description: Sort direction
                  example: asc
              required:
                - field
                - direction
          in: query
          name: orderBy
          required: false
        - schema:
            type: array
            items:
              type: string
            example:
              - a
              - b
          in: query
          name: whereActions
          required: false
          description: >-
            Filter by exact action keys (see `AUDIT_ACTIONS`), e.g.
            `["anomaly.created"]`.
        - schema:
            type: string
            maxLength: 200
            example: lobby
          in: query
          name: whereActionPrefix
          required: false
          description: Filter by action prefix, e.g. `anomaly.` for every anomaly event.
        - schema:
            type: array
            items:
              type: string
            example:
              - data
              - auth
          in: query
          name: whereCategories
          required: false
          description: Filter by one or more audit categories.
        - schema:
            type: array
            items:
              type: string
            example:
              - auto
              - semantic
          in: query
          name: whereKinds
          required: false
          description: '`auto` for field-level diffs, `semantic` for business events.'
        - schema:
            anyOf:
              - type: object
                properties:
                  start:
                    type: string
                  end:
                    type: string
              - type: object
                properties:
                  gte:
                    type: string
                  lte:
                    type: string
            example:
              start: '2026-01-01'
              end: '2026-01-31'
          in: query
          name: whereCreatedAt
          required: false
          description: Filter by the event date range.
        - schema:
            type: array
            items:
              type: string
            example:
              - Anomaly
              - AnomalyIntervention
          in: query
          name: whereEntityTypes
          required: false
          description: Filter by one or more audited entity types.
        - 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: query
          name: whereEntityId
          required: false
          description: Filter by a single audited entity id.
        - schema:
            maxItems: 250
            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)$
            example:
              - 550e8400-e29b-41d4-a716-446655440000
              - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
          in: query
          name: whereActorUserIds
          required: false
          description: Filter by the acting user ids.
        - schema:
            type: array
            items:
              type: string
            example:
              - user
              - na
          in: query
          name: whereActorTypes
          required: false
          description: Filter by actor kind (`user`, `system`, `provider`, …).
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    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)$
                        createdAt:
                          type: string
                          format: date-time
                        action:
                          type: string
                          minLength: 1
                          maxLength: 120
                        kind:
                          type: string
                          enum:
                            - auto
                            - semantic
                        category:
                          type: string
                          enum:
                            - data
                            - auth
                            - access
                            - system
                        actorType:
                          type: string
                          enum:
                            - user
                            - na
                            - system
                            - provider
                            - anonymous
                        actorUserId:
                          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)$
                        actorAudience:
                          nullable: true
                          type: string
                          minLength: 1
                          maxLength: 16
                        displayActorName:
                          nullable: true
                          type: string
                          minLength: 1
                          maxLength: 255
                        entityType:
                          nullable: true
                          type: string
                          minLength: 1
                          maxLength: 64
                        entityId:
                          nullable: true
                          type: string
                          minLength: 1
                        unitId:
                          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)$
                        changedFields:
                          type: array
                          items:
                            type: string
                        before:
                          nullable: true
                          type: object
                          additionalProperties: {}
                        after:
                          nullable: true
                          type: object
                          additionalProperties: {}
                        payload:
                          nullable: true
                          type: object
                          properties:
                            comment:
                              type: string
                            attachment:
                              type: object
                              properties:
                                id:
                                  type: string
                                filename:
                                  type: string
                                mimetype:
                                  type: string
                              required:
                                - id
                                - filename
                                - mimetype
                              additionalProperties: false
                            params:
                              type: object
                              additionalProperties:
                                anyOf:
                                  - type: string
                                  - type: number
                                nullable: true
                          additionalProperties: false
                        metadata:
                          nullable: true
                          type: object
                          additionalProperties: {}
                        ip:
                          nullable: true
                          type: string
                          minLength: 1
                        userAgent:
                          nullable: true
                          type: string
                          minLength: 1
                        requestId:
                          nullable: true
                          type: string
                          minLength: 1
                        correlationId:
                          nullable: true
                          type: string
                          minLength: 1
                      required:
                        - id
                        - createdAt
                        - action
                        - kind
                        - category
                        - actorType
                        - actorUserId
                        - actorAudience
                        - displayActorName
                        - entityType
                        - entityId
                        - unitId
                      additionalProperties: false
                  totalCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                      pageSize:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                      totalPages:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - page
                      - pageSize
                      - totalPages
                    additionalProperties: false
                required:
                  - data
                  - totalCount
                  - pagination
                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

````