---
title: "Readiness Check"
method: GET
path: "/health/ready"
tags: ["health"]
---

# Readiness Check

`GET /health/ready`

## Request

- Base URL: `https://api.pcbgenerator.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pcbgenerator.com/health/ready`
- Auth: none declared

Readiness probe: 200 only when the component catalog is actually usable.

⚡ This endpoint is a BARRIER, not a poll. `main.py` preloads the catalog in
a background task *after* the server starts serving, so there is a window
where the port answers and no part can be found. `get_database_stats()`
calls `_ensure_loaded()`, which blocks under a lock until that load
finishes — so ONE request here waits out startup instead of sampling it.
That is what makes it usable as a start-up gate for an automated run
(frontend/playwright.config.ts waits on this URL).

⛔ Two distinct not-ready states, deliberately not collapsed: the call
RAISED (service broken), or it returned an EMPTY catalog. The second is the
one that used to report ready — see the comment in `health_check` above.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/pcbgenerator/apis/pcb-stackup-generator-api.md) · [All operations](https://skmtc.dev/pcbgenerator/apis/pcb-stackup-generator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pcbgenerator/apis/pcb-stackup-generator-api/revisions/b6084b3ace32?raw)
