Stack Pulse Docs
StackPulse

StackPulse Docs

API Health Check

Use a lightweight health endpoint to monitor API and dependency status.

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 ms

Response design

Use simple values that operators can interpret quickly:

FieldPurpose
statusOverall health for the endpoint.
apiWhether the API process can answer.
databaseWhether 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.