Health Monitoring API
Section titled “Health Monitoring API”These endpoints expose health and version-update information for a running Hoody Code instance. They are designed for liveness probes, dashboards, and tooling that needs to know whether a newer Hoody Code release is available.
- The health probe is intentionally skipped from the activity-heartbeat counter, so repeated polling does not keep Hoody Code artificially alive.
- The update check queries GitHub releases every six hours and surfaces the result on demand.
Health Check
Section titled “Health Check”GET /api/v1/code/health
Section titled “GET /api/v1/code/health”Returns the standardized service health status, including process, runtime, and memory information. This endpoint does not count towards heartbeat activity, making it safe to call from liveness probes without extending the container’s idle window.
This endpoint takes no parameters.
Response
Section titled “Response”{ "status": "ok", "service": "hoody-code", "built": "2026-04-13T14:30:00Z", "started": "2026-04-13T15:00:00Z", "memory": { "rss": 134217728, "heap": 29360128 }, "fds": 47, "pid": 1, "ip": "198.51.100.42", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36"}| Field | Type | Description |
|---|---|---|
status | string | Service status. Always "ok" when the endpoint returns successfully. |
service | string | Service identifier. Always "hoody-code". |
built | string | null | ISO 8601 build timestamp (mtime of the compiled entry file), or null if unavailable. |
started | string | ISO 8601 timestamp when the process started. |
memory | object | null | Process memory snapshot. Contains rss (resident set size in bytes) and heap (V8 heap used in bytes, nullable). |
fds | integer | null | Open file descriptor count (from /proc/self/fd), or null if unavailable. |
pid | integer | Process ID. |
ip | string | Remote peer IP (req.socket.remoteAddress). Never reads X-Forwarded-For. |
userAgent | string | null | Value of the request User-Agent header. |
Example Request
Section titled “Example Request”curl https://{projectId}-{containerId}-code-1.{server}.containers.hoody.com/api/v1/code/healthimport { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-code-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.code.health.check();Update Check
Section titled “Update Check”GET /api/v1/code/update/check
Section titled “GET /api/v1/code/update/check”Returns whether a newer Hoody Code release is available. The endpoint queries the GitHub releases API unless update checks were disabled at startup with --disable-update-check. Checks are throttled to once every six hours and a notification is surfaced at most once per week.
This endpoint takes no parameters.
Response
Section titled “Response”{ "current": "4.0.0", "latest": "4.1.0", "updateAvailable": true}| Field | Type | Description |
|---|---|---|
current | string | Currently running Hoody Code version. |
latest | string | Latest Hoody Code version published on GitHub. |
updateAvailable | boolean | true when latest is newer than current. |
Example Request
Section titled “Example Request”curl https://{projectId}-{containerId}-code-1.{server}.containers.hoody.com/api/v1/code/update/checkimport { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-code-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.code.health.checkUpdate();