---
title: "Liveness: is the process up and can it reach the database"
method: GET
path: "/health"
tags: ["meta"]
---

# Liveness: is the process up and can it reach the database

`GET /health`

## Request

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

A cheap check for load balancers: always 200. status is ok, or degraded when the
database does not answer. database is "up", "busy" (every pooled connection is in use
right now: the service is loaded, not broken, and status stays ok) or "down". commit
is the git commit this image was built from, "unknown" outside a deploy.
runs_in_flight counts research runs queued or running across the service (null when
the database did not answer): a restart waits for 0, because Railway's in-place
restart kills the process about 10 seconds after SIGTERM. It waits at most about 2
seconds for a connection and never calls a provider.

## Response `200`

Successful Response

- HealthOut
  - `status` union, required
    - 'ok' | 'degraded'
    - string
  - `version` string, required
  - `commit` string, nullable: the git commit this image was built from; "unknown" outside a deploy
  - `database` union, required: "busy": every pooled connection is in use; the service is loaded, not down, and status stays ok
    - 'up' | 'busy' | 'down'
    - string
  - `started_at` string, nullable: when this process started (ISO 8601); a new value means a restart
  - `runs_in_flight` integer, nullable: research runs queued or running across the service right now; null when the database did not answer. An operator restarts only at 0

---

[API](https://skmtc.dev/hookdetector/apis/hook-detector.md) · [All operations](https://skmtc.dev/hookdetector/apis/hook-detector/llms.txt) · [OpenAPI document](https://skmtc.dev/hookdetector/apis/hook-detector/revisions/b136a2804d2b?raw)
