> ## 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 a library-anomaly category



## OpenAPI

````yaml /api/ad/openapi.json get /ad/categories/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:
  /ad/categories/v1/{id}:
    get:
      tags:
        - categories
      summary: Get a library-anomaly category
      operationId: getCategoryADV1
      parameters:
        - schema:
            type: array
            items:
              type: string
              enum:
                - subcategories
                - count-library-anomalies
                - actions-info
                - updatable-fields
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "subcategories": The active subcategories belonging to this
                category.

                - "count-library-anomalies": Adds `countLibraryAnomalies`
                (distinct active LibraryAnomaly rows referencing this category,
                directly or via one of its subcategories).

                - "actions-info": Adds `actions` - which mutations are currently
                possible on this category.

                - "updatable-fields": Per-field write rules for this category in
                its current state.
          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: 100
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  subcategories:
                    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
                        color:
                          nullable: true
                          type: string
                          pattern: ^#[0-9a-fA-F]{6}$
                      required:
                        - id
                        - name
                        - color
                      additionalProperties: false
                  countLibraryAnomalies:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  actions:
                    type: object
                    properties:
                      canBeUpdated:
                        type: boolean
                      canBeDeleted:
                        type: boolean
                    required:
                      - canBeUpdated
                      - canBeDeleted
                    additionalProperties: false
                  updatableFields:
                    type: object
                    properties:
                      name:
                        type: boolean
                      subcategories:
                        type: boolean
                    required:
                      - name
                      - subcategories
                    additionalProperties: false
                required:
                  - id
                  - name
                  - 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

````