> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Obtener el contrato de escritura de una clave

> Devuelve el contrato de escritura esperado para una clave de Systemplane registrada: su esquema JSON, reglas de validación semántica, ejemplos válidos, valor por defecto y la ruta `PUT` correspondiente. El esquema es metadato del contrato; el valor actualmente configurado se lee desde `GET /system/{namespace}/{key}`. Cuando la autenticación está habilitada, este endpoint de descubrimiento requiere permiso de lectura para al menos un espacio de nombres de Systemplane.



## OpenAPI

````yaml es/openapi/v3-current/systemplane.yaml get /system/-/catalog/{namespace}/{key}
openapi: 3.1.0
info:
  title: API de administración de Systemplane de Lerian
  version: v1.0.0
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  license:
    name: Lerian Studio General License
  description: >-
    La API de administración de Systemplane es el plano de control de
    configuración en tiempo de ejecución compartido que las aplicaciones de
    Lerian exponen para que puedas inspeccionar y cambiar ajustes operativos en
    un servicio en ejecución, sin reiniciarlo. En entornos financieros
    regulados, detener un servicio para aplicar un cambio de configuración es a
    la vez un riesgo de cumplimiento y una interrupción operativa; Systemplane
    te permite ajustar los valores que un servicio admite de forma segura
    mientras sigue atendiendo tráfico.


    Esta superficie no es un servicio independiente. Cada aplicación monta el
    mismo conjunto de rutas en su propio host y puerto HTTP bajo un prefijo de
    ruta específico de la aplicación: no hay un host ni un puerto dedicados de
    Systemplane. El prefijo canónico documentado aquí es `/system`, pero varía
    según la aplicación (por ejemplo, Lender lo monta bajo `/api/v1/systemplane`
    y los rieles del SFN bajo `/v1/system`). Sustituye el host, el puerto y el
    prefijo de la aplicación cuya configuración estás gestionando. Como las
    rutas se registran de forma programática en lugar de generarse con un
    generador de código, no aparecen en la referencia de API generada de cada
    producto; esta especificación documenta la superficie a mano.


    La configuración se organiza en **espacios de nombres**, cada uno con
    entradas planas indexadas por clave de texto. Los rieles y los plugins usan
    tres espacios de nombres canónicos: `runtime_config` (ajustes operativos
    como límites de tasa e intervalos de workers), `tenant_policy` (objetos de
    política con alcance por tenant) y `operational_registry` (datos operativos
    de consulta). Algunas aplicaciones registran en su lugar un único espacio de
    nombres con el nombre de la aplicación. El valor de cada entrada no tiene
    tipo en la capa de transporte: cada clave registrada acepta su propio
    escalar, objeto o arreglo JSON, validado por el validador del lado del
    servidor de esa clave.


    La autorización es **denegar todo por defecto**. Cuando la autenticación
    está habilitada, una aplicación aplica control de acceso basado en roles por
    espacio de nombres: las lecturas requieren el permiso de lectura del espacio
    de nombres (`system_runtime_config:read`, `system_tenant_policy:read` o
    `system_operational_registry:read`) y las escrituras requieren el permiso de
    escritura correspondiente (`system_runtime_config:write`,
    `system_tenant_policy:write` o `system_operational_registry:write`). Las
    cadenas exactas de permiso pueden variar según la aplicación. Toda la
    superficie está controlada por el ajuste `SYSTEMPLANE_ENABLED`, que está
    desactivado por defecto; cuando está deshabilitado, la aplicación funciona
    en modo solo variables de entorno y estas rutas no se sirven.


    Una superficie de catálogo opcional bajo la ruta reservada `/-/catalog` te
    permite descubrir qué claves registra una aplicación, junto con el contrato
    de escritura de cada clave (tipo, alcance de tenant, política de redacción,
    reglas de validación y ejemplos). Los errores usan un sobre plano `{"code":
    <int>, "title": "<string>", "message": "<string>"}`. Las operaciones de
    mutación devuelven `204 No Content` cuando tienen éxito.
servers:
  - url: https://{host}
    description: >-
      The Systemplane admin API is served by each Lerian application on its own
      host and port under an application-specific prefix (default `/system`).
      Substitute the host of the application whose runtime configuration you are
      managing.
    variables:
      host:
        default: your-lerian-app.example.com
        description: >-
          The host (and port) of the application that mounts the Systemplane
          admin API.
security:
  - BearerAuth: []
tags:
  - name: Entries
    description: >-
      Lista, lee, escribe y elimina las entradas de configuración gestionadas en
      tiempo de ejecución dentro de un espacio de nombres.
  - name: Catalog
    description: >-
      Descubre las claves que registra una aplicación y el contrato de escritura
      esperado de cada clave. Opcional por aplicación.
paths:
  /system/-/catalog/{namespace}/{key}:
    get:
      tags:
        - Catalog
      summary: Obtener el contrato de escritura de una clave
      description: >-
        Devuelve el contrato de escritura esperado para una clave de Systemplane
        registrada: su esquema JSON, reglas de validación semántica, ejemplos
        válidos, valor por defecto y la ruta `PUT` correspondiente. El esquema
        es metadato del contrato; el valor actualmente configurado se lee desde
        `GET /system/{namespace}/{key}`. Cuando la autenticación está
        habilitada, este endpoint de descubrimiento requiere permiso de lectura
        para al menos un espacio de nombres de Systemplane.
      operationId: getSystemplaneCatalogKey
      parameters:
        - $ref: '#/components/parameters/Namespace'
        - $ref: '#/components/parameters/Key'
      responses:
        '200':
          description: The key's write contract.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogDetailResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - BearerAuth: []
components:
  parameters:
    Namespace:
      name: namespace
      in: path
      required: true
      description: >-
        The Systemplane namespace. Rails and plugins use `runtime_config`,
        `tenant_policy`, or `operational_registry`; some applications register a
        single application-named namespace instead.
      schema:
        type: string
        examples:
          - runtime_config
    Key:
      name: key
      in: path
      required: true
      description: >-
        The registered key within the namespace. Keys are flat, dot-delimited
        identifiers; a key may itself contain `/` segments.
      schema:
        type: string
        examples:
          - tenancy.ispb_organization_bindings
  schemas:
    CatalogDetailResponse:
      type: object
      additionalProperties: false
      description: The full write contract for one registered key.
      properties:
        catalogVersion:
          type: string
          description: The catalog schema version.
          examples:
            - systemplane.catalog.v1
        service:
          type: string
          description: The application that serves this catalog.
          examples:
            - matcher
        namespace:
          type: string
          description: The namespace the key belongs to.
          examples:
            - tenant_policy
        key:
          type: string
          description: The registered key.
          examples:
            - tenancy.ispb_organization_bindings
        kind:
          type: string
          description: The value kind the key accepts.
          examples:
            - object
        tenantScoped:
          type: boolean
          description: Whether the key's value is resolved per tenant.
          examples:
            - false
        runtimeClass:
          type: string
          description: When a change takes effect.
          examples:
            - read_live
        redaction:
          type: string
          description: The redaction policy applied to the value on read.
          examples:
            - mask
        hasValidator:
          type: boolean
          description: Whether the key has a server-side write validator.
          examples:
            - true
        description:
          type: string
          description: A human-readable description of the key.
          examples:
            - Tenant-scoped JSON object keyed by ISPB
        detailUrl:
          type: string
          description: The relative URL of this detail resource.
          examples:
            - /system/-/catalog/tenant_policy/tenancy.ispb_organization_bindings
        defaultValue:
          description: The key's default value. Untyped — matches the key's kind.
        schema:
          type: object
          additionalProperties: true
          description: The JSON schema the value is validated against.
        rules:
          type: array
          description: >-
            Human-readable semantic validation rules beyond the JSON schema.
            Omitted when there are none.
          items:
            type: string
          examples:
            - - Each ISPB must be an 8-digit string.
        examples:
          type: array
          description: Valid example values for the key. Omitted when there are none.
          maxItems: 10
          items:
            $ref: '#/components/schemas/CatalogExample'
        write:
          $ref: '#/components/schemas/CatalogWrite'
      required:
        - catalogVersion
        - service
        - namespace
        - key
        - kind
        - tenantScoped
        - runtimeClass
        - redaction
        - hasValidator
        - description
        - detailUrl
        - schema
        - write
    CatalogExample:
      type: object
      additionalProperties: false
      description: A named example value valid for the key.
      properties:
        name:
          type: string
          description: A short label for the example.
          examples:
            - single ISPB binding
        value:
          description: The example value.
      required:
        - name
    CatalogWrite:
      type: object
      additionalProperties: false
      description: The write descriptor for a key — the request you send to change it.
      properties:
        method:
          type: string
          description: The HTTP method used to write the key.
          examples:
            - PUT
        path:
          type: string
          description: The relative path the write is sent to.
          examples:
            - /system/tenant_policy/tenancy.ispb_organization_bindings
        bodyShape:
          type: object
          additionalProperties: true
          description: 'The request-body shape, always `{"value": <json>}`.'
          examples:
            - value: {}
      required:
        - method
        - path
        - bodyShape
    ErrorResponse:
      type: object
      additionalProperties: false
      description: >-
        The flat error envelope returned across the Systemplane admin surface.
        It carries a machine-readable HTTP status code, a short title, and a
        human-readable message; it never returns secret material.
      properties:
        code:
          type: integer
          description: The HTTP status code.
          examples:
            - 403
        title:
          type: string
          description: A short, machine-readable title for the error class.
          examples:
            - forbidden
        message:
          type: string
          description: A human-readable description of what went wrong.
          examples:
            - 'systemplane admin: insufficient permissions: permission denied'
      required:
        - code
        - title
        - message
  responses:
    BadRequest:
      description: >-
        The request is caller-correctable — an unknown key, a missing or invalid
        `value`, a value that fails the key's validator, or a request that is
        not valid for the current tenancy mode.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: >-
        Authentication failed, or there is no trusted platform identity on the
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        The authorizer denied the request — the identity lacks the namespace
        permission required for this action, or the surface is deny-all because
        no authorizer is configured.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The namespace or key does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: An internal fault. Detail is logged, not returned.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailable:
      description: >-
        The Systemplane store is not started or has been closed — the
        application is not currently able to serve the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer JWT issued by the platform's Access Manager (plugin-auth /
        lib-auth). Authorization is deny-all by default: the application must be
        configured with an authorizer, and when authentication is enabled it
        enforces per-namespace role-based access control on top of a valid,
        platform-scoped (non-tenant) identity. Machine callers obtain a token
        via the Access Manager client-credentials flow.

````