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

# Readiness probe

> Folds the full probe set (boot gates, Postgres reachability, consumer liveness, and the degraders) into one readiness verdict. `Healthy` and `Degraded` return `200` (kept in rotation); `Down` returns `503`. Wire it to a Kubernetes readiness probe. Unauthenticated.



## OpenAPI

````yaml en/openapi/v3-current/streaming-hub.yaml get /readyz
openapi: 3.1.0
info:
  title: Lerian Streaming Hub API
  version: v1.0.0
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  license:
    name: Lerian Studio General License
  description: >-
    The Streaming Hub control-plane API. Streaming Hub is Lerian's managed
    event-delivery edge: it consumes CloudEvents from the platform's internal
    streaming backbone and fans them out to a tenant's own external destinations
    — webhooks, Amazon SQS, RabbitMQ, Amazon EventBridge, or a pull inbox. This
    API lets a tenant browse the manifest-fed event catalog, create and manage
    delivery subscriptions, verify and rotate their credentials, read delivery
    health, and pull entitled events.


    Errors use a flat `{"error":"<token>"}` envelope (a low-cardinality,
    machine-readable token — never RFC 9457 problem+json). Mutating operations
    require an `X-Idempotency` header for at-most-once semantics; a replayed
    request returns the original response byte-for-byte with
    `X-Idempotency-Replayed: true`. The catalog and the pull events surface are
    tenant-scoped through the bearer JWT; the operational probe endpoints
    (`/healthz`, `/readyz`, `/version`, `/runtime`, `/metrics`) are
    unauthenticated. Streaming Hub is closed source under the Lerian Studio
    General License.
servers:
  - url: https://streaming-hub.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - name: Catalog
    description: Browse the manifest-fed catalog of event types available for subscription.
  - name: Subscriptions
    description: >-
      Create, read, update, and delete delivery subscriptions, and drive the
      destination verification lifecycle (ping, verify, credential, delegated
      grant, secret rotation, health).
  - name: Event Delivery
    description: >-
      Pull entitled events for a pull-sink subscription
      (cursor-as-acknowledgment read).
  - name: Admin
    description: Cross-tenant operator forensics. Requires an operator authorization scope.
  - name: Operational
    description: Unauthenticated liveness, readiness, build, runtime, and metrics probes.
paths:
  /readyz:
    get:
      tags:
        - Operational
      summary: Readiness probe
      description: >-
        Folds the full probe set (boot gates, Postgres reachability, consumer
        liveness, and the degraders) into one readiness verdict. `Healthy` and
        `Degraded` return `200` (kept in rotation); `Down` returns `503`. Wire
        it to a Kubernetes readiness probe. Unauthenticated.
      operationId: getReadiness
      responses:
        '200':
          description: The replica is ready (state `healthy` or `degraded`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadinessResponse'
        '503':
          description: The replica is not ready (state `down`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadinessResponse'
      security: []
components:
  schemas:
    ReadinessResponse:
      type: object
      description: The readiness verdict and its per-probe detail.
      properties:
        state:
          type: string
          description: >-
            The folded readiness state. `healthy` / `degraded` return `200`;
            `down` returns `503`.
          enum:
            - healthy
            - degraded
            - down
          examples:
            - healthy
      required:
        - state
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer JWT issued by plugin-auth (lib-auth). The tenant identity is
        resolved from the validated token claims; the `/v1` surface never reads
        a tenant from the body, path, or query. Machine callers obtain a token
        via the plugin-auth client-credentials flow. The `/admin` surface
        authorizes against an operator scope and carries no tenant context.

````