Status & Monitoring
Section titled “Status & Monitoring”These endpoints report the health of the daemon itself and the runtime status of every program it manages. Use them to build dashboards, liveness probes, alerting, and log inspection into supervised processes. All endpoints live on the container’s daemon hostname; the health probe is unauthenticated while the status and log endpoints require an authenticated HoodyClient.
Health
Section titled “Health”GET /api/v1/daemon/health
Section titled “GET /api/v1/daemon/health”Returns the standardized 9-field health response. Unauthenticated. Always returns HTTP 200 with Content-Type: application/json when the service is up.
This endpoint takes no parameters.
curl -X GET 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/health'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.daemon.health.check();Service is healthy.
{ "status": "ok", "service": "hoody-daemon", "built": "2026-02-10T12:00:00Z", "started": "2026-02-10T17:39:50Z", "memory": { "rss": 52428800, "heap": 33554432 }, "fds": 12, "pid": 1234, "ip": "10.0.0.5", "userAgent": "hoody-sdk/1.0"}Program Status
Section titled “Program Status”GET /api/v1/daemon/status
Section titled “GET /api/v1/daemon/status”Retrieves the current runtime status of all configured programs. Returns information about whether each program is running, stopped, or in another state, along with process details for running programs.
This endpoint takes no parameters.
curl -X GET 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/status' \ -H 'Authorization: Bearer <token>'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.daemon.status.getAll();Successfully retrieved status for all programs.
mixed-status
{ "success": true, "statuses": [ { "id": 1, "name": "web-server", "enabled": true, "status": { "id": 1, "status": "running", "pid": 1234, "uptime": "2:15:30" } }, { "id": 2, "name": "nodejs-app", "enabled": false, "status": { "id": 2, "status": "stopped" } } ]}all-running
{ "success": true, "statuses": [ { "id": 1, "name": "web-server", "enabled": true, "status": { "id": 1, "status": "running", "pid": 1234, "uptime": "1:00:00" } }, { "id": 2, "name": "api-server", "enabled": true, "status": { "id": 2, "status": "running", "pid": 1235, "uptime": "0:45:12" } } ]}A query parameter was present but unparseable (include_stats). These are rejected rather than silently ignored: a dropped value does not mean “no opinion”, it widens the operation to its default — an invalid port would return every instance instead of the one named, and an invalid filter would return the full list.
{ "success": false, "error": "Invalid query parameter: include_stats"}GET /api/v1/daemon/status/{id}
Section titled “GET /api/v1/daemon/status/{id}”Retrieves the current runtime status of a specific program by ID. For port-range programs, returns all running instances unless a specific port is requested via query parameter. Returns detailed process information including PID and uptime.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Unique numeric identifier of the program |
port | query | integer | No | Filter to specific port instance (for port-range programs only) |
include_stats | query | string | No | Include resource stats (CPU, memory, process tree) for running programs. Accepts the literal strings "true" or "false". WHERE the stats land depends on the program: a standard program gets a top-level stats; a port-range program gets one stats per instance, on the instance itself (instance.stats, or instances[].stats), never at the top level. Each carries pid, started_at, cpu_percent, memory_rss_bytes, process_count and a per-process breakdown. |
curl -X GET 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/status/1?include_stats=true' \ -H 'Authorization: Bearer <token>'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.daemon.status.get(1, { include_stats: 'true' });Successfully retrieved program status.
running
{ "success": true, "status": { "id": 1, "status": "running", "pid": 1234, "uptime": "2:15:30" }, "stats": { "pid": 1234, "started_at": "2026-02-10T17:39:50Z", "cpu_percent": 12.5, "memory_rss_bytes": 52428800, "process_count": 3, "processes": [ { "pid": 1234, "command": "node server.js", "cpu_percent": 2.1, "memory_rss_bytes": 30000000 }, { "pid": 1235, "command": "node worker.js", "cpu_percent": 5.2, "memory_rss_bytes": 12000000 }, { "pid": 1236, "command": "node worker.js", "cpu_percent": 5.2, "memory_rss_bytes": 10428800 } ] }}stopped
{ "success": true, "status": { "id": 1, "status": "stopped" }}fatal
{ "success": true, "status": { "id": 1, "status": "fatal" }}A query parameter was present but unparseable (port, include_stats). These are rejected rather than silently ignored: a dropped value does not mean “no opinion”, it widens the operation to its default — an invalid port would return every instance instead of the one named, and an invalid filter would return the full list.
{ "success": false, "error": "Invalid query parameter: port"}Program not found.
{ "success": false, "error": "Program with ID 999 not found"}Program Logs
Section titled “Program Logs”GET /api/v1/daemon/programs/{id}/logs
Section titled “GET /api/v1/daemon/programs/{id}/logs”Retrieve the last N lines from a program’s stdout or stderr log file.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Program ID |
type | query | string | No | Log stream: stdout or stderr. Default: "stdout" |
lines | query | integer | No | Number of lines to return from end of file. Default: 100 |
port | query | integer | No | Port number (required for port-range programs) |
curl -X GET 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/1/logs?type=stderr&lines=50' \ -H 'Authorization: Bearer <token>'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.daemon.status.getLogs(1, { type: 'stderr', lines: 50 });Log content retrieved successfully.
{ "success": true, "logs": "2026-02-10 17:39:50 INFO Server listening on port 3000\n2026-02-10 17:39:51 INFO Request received: GET /health\n", "type": "stdout", "lines": 100, "log_file": "/var/log/supervisor/web-server.log"}Bad request.
{ "success": false, "error": "Invalid log type: must be 'stdout' or 'stderr'"}