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

# Readiness check

> Readiness probe, distinct from GET /health's pure liveness check: when storage is Supabase-backed, this one actually queries Postgres (SELECT 1, no table rows transferred) so an orchestrator can tell a process that is up but backed by dead storage apart from one that is genuinely ready to serve traffic. When storage is not Supabase-backed (NODE_ENV=test, or PARMANA_STORAGE=memory outside test), there is no external dependency to probe, so this reports READY unconditionally. Exempt from caller authentication for the same reason GET /health is, see packages/api/src/routes/ready.ts.




## OpenAPI

````yaml /openapi.bundled.yaml get /ready
openapi: 3.1.0
info:
  title: Parmana API
  version: 1.0.0
  description: >
    Parmana is an Execution Trust Infrastructure that ensures there is no gap
    between what humans decide and what AI systems do. The API enables creation,
    execution, verification, replay, and auditing of Business Transactions
    through cryptographically verifiable Execution Trust Records.


    **Every route requires a caller bearer key**, except the liveness/readiness
    probes and documentation/verification routes that must be reachable with no
    credential: GET /health, GET /ready, GET /openapi.yaml, GET /documentation,
    GET /reference, POST /refusal/verify, POST /audit/verify, GET /keys/{keyId},
    and GET /.well-known/jwks.json. Send `Authorization: Bearer <key>` on every
    other request. Keys are issued by `scripts/generate-api-key.ts` and
    configured server-side via `PARMANA_API_KEYS`; only a hash of each key is
    ever held by the server, verified in constant time. A missing or invalid
    credential returns 401 before a Business Transaction is even constructed,
    independent of Policy evaluation and gateway attestation, see
    `packages/api/src/middleware/caller-auth.ts` and
    [Authentication](/api-reference/authentication). Local development may set
    `PARMANA_AUTH_DISABLED=true` to skip this middleware entirely; that flag
    must never be set in a real deployment.
  contact:
    name: Parmana Systems
    email: founder@parmanasystems.com
  license:
    name: Proprietary, source-available for evaluation only, see LICENSE
    url: https://github.com/pavancharak/AgentLabsBuildathon/blob/main/LICENSE
servers:
  - url: http://localhost:3000
    description: Local (packages/api, PORT env var, default 3000)
security:
  - bearerAuth: []
tags:
  - name: Execution
    description: >-
      Executes a Business Transaction through the complete Execution Trust
      pipeline
  - name: Transactions
    description: Business Transaction creation and retrieval
  - name: Verification
    description: Deterministic verification of an Execution Trust Record
  - name: Receipts
    description: Cryptographically signed Execution Trust Receipts
  - name: Trust Records
    description: Execution Trust Record retrieval
  - name: Replay
    description: Deterministic replay of a recorded Execution Trust Record
  - name: Policies
    description: Policy existence/readability check
  - name: Policy Governance
    description: Maker-checker proposal, listing, approval, and rejection of policy changes
  - name: Refusal Records
    description: >-
      Durable, signed evidence that a policy decision rejected a transaction
      (RFC-0021)
  - name: Audit
    description: >-
      Signed caller-authentication audit events, independently
      third-party-verifiable
  - name: System
    description: Operational endpoints
paths:
  /ready:
    get:
      tags:
        - System
      summary: Readiness check
      description: >
        Readiness probe, distinct from GET /health's pure liveness check: when
        storage is Supabase-backed, this one actually queries Postgres (SELECT
        1, no table rows transferred) so an orchestrator can tell a process that
        is up but backed by dead storage apart from one that is genuinely ready
        to serve traffic. When storage is not Supabase-backed (NODE_ENV=test, or
        PARMANA_STORAGE=memory outside test), there is no external dependency to
        probe, so this reports READY unconditionally. Exempt from caller
        authentication for the same reason GET /health is, see
        packages/api/src/routes/ready.ts.
      operationId: getReady
      responses:
        '200':
          description: Storage reachable, or not Supabase-backed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ready-response.schema'
              examples:
                authEnabled:
                  summary: Real captured response
                  value:
                    status: READY
                    storage: not-supabase-backed
                    authDisabled: false
                authDisabled:
                  summary: Real captured response
                  value:
                    status: READY
                    storage: not-supabase-backed
                    authDisabled: true
                    warning: >-
                      PARMANA_AUTH_DISABLED=true -- this deployment is accepting
                      requests with no caller authentication. Must never be set
                      in a real deployment.
        '503':
          description: >-
            Supabase-backed storage is configured but Postgres could not be
            reached. Shape derived from packages/api/src/routes/ready.ts's catch
            branch, not independently reproducible outside a real
            Supabase-backed deployment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ready-response.schema'
              examples:
                notReady:
                  summary: Shape, not a live capture
                  value:
                    status: NOT_READY
                    reason: connect ECONNREFUSED 127.0.0.1:5432
                    authDisabled: false
      security: []
components:
  schemas:
    ready-response.schema:
      title: Ready Response
      description: >-
        Response returned by GET /ready on both status codes (200 READY, 503
        NOT_READY). Distinct from GET /health's pure liveness check: when
        storage is Supabase-backed, this one actually queries Postgres (SELECT
        1) so an orchestrator can route around a process that is up but backed
        by dead storage.
      type: object
      additionalProperties: false
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - READY
            - NOT_READY
        storage:
          type: string
          description: >-
            Present only when status is READY and storage is not Supabase-backed
            (NODE_ENV=test, or PARMANA_STORAGE=memory outside test): there is no
            external dependency to probe, so readiness is reported
            unconditionally.
          enum:
            - not-supabase-backed
        reason:
          type: string
          description: >-
            Present only when status is NOT_READY: the underlying Postgres error
            message.
        authDisabled:
          type: boolean
          description: >-
            True when this process was started with PARMANA_AUTH_DISABLED=true.
            Surfaced here, not only as a startup log line, so an operator's own
            synthetic checks against GET /ready can alert on it directly.
        warning:
          type: string
          description: Present only when authDisabled is true.
      examples:
        - status: READY
          storage: not-supabase-backed
          authDisabled: false
        - status: READY
          storage: not-supabase-backed
          authDisabled: true
          warning: >-
            PARMANA_AUTH_DISABLED=true -- this deployment is accepting requests
            with no caller authentication. Must never be set in a real
            deployment.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Caller API key issued by scripts/generate-api-key.ts. Sent as
        Authorization: Bearer <key>. Verified against a stored SHA-256 hash in
        constant time by packages/api/src/auth/StaticKeyAuthenticator.ts.
        Required on every route not listed as exempt in this document's
        top-level description. See /api-reference/authentication.

````