API health checks are useful because they return a clear machine-readable answer instead of relying on a full product page.
Why health endpoints help
A good /health endpoint can show whether the API process is running and whether required dependencies are reachable.
Keep the endpoint safe:
- Do not expose secrets.
- Do not include private customer data.
- Do not run expensive queries.
- Do not require write access.
Example response
json
{
"status": "ok",
"api": "ok",
"database": "ok"
}StackPulse can check the endpoint with a basic HTTP check:
text
Name: API health
Method: GET
URL: https://api.example.com/health
Expected status: 200
Timeout: 5000 msResponse design
Use simple values that operators can interpret quickly:
| Field | Purpose |
|---|---|
status | Overall health for the endpoint. |
api | Whether the API process can answer. |
database | Whether the database dependency is reachable. |
If your API has several dependencies, report only the ones that matter for availability.
Keep it lightweight
A health endpoint should be fast enough to run often without changing production behavior.