Status & Monitoring
Section titled “Status & Monitoring”Use these endpoints to monitor daemon health, inspect the runtime status of managed programs, and retrieve program log output. The health endpoint is unauthenticated and suitable for liveness probes. The status endpoints return runtime information (PIDs, uptime, lifecycle state) for programs managed by the daemon, and the logs endpoint returns the tail of a program’s stdout or stderr stream.
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 http://localhost:9636/api/v1/daemon/healthconst result = await client.daemon.health.check();Response
Section titled “Response”{ "status": "ok", "service": "hoody-daemon", "built": "2026-01-15T10:30:00Z", "started": "2026-01-20T08:00:00Z", "memory": { "rss": 25165824, "heap": null }, "fds": 42, "pid": 1234, "ip": "192.168.1.10", "userAgent": "Hoody/1.0"}| Field | Type | Description |
|---|---|---|
status | string | Service status. Always "ok" when healthy |
service | string | Service name |
built | string | Executable mtime as RFC3339 string |
started | string | Process start time as RFC3339 string |
memory | object | Memory usage with rss (required) and optional heap |
fds | integer | Count of open file descriptors |
pid | integer | Process ID of the daemon |
ip | string | IP address the daemon is bound to |
userAgent | string | User-Agent header from the incoming request |
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 http://localhost:9636/api/v1/daemon/statusconst result = await client.daemon.status.getAll();Response
Section titled “Response”Programs in various states
{ "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" } }, { "id": 3, "name": "worker", "enabled": true, "status": { "id": 3, "status": "FATAL" } } ]}All programs running
{ "success": true, "statuses": [ { "id": 1, "name": "web-server", "enabled": true, "status": { "id": 1, "status": "RUNNING", "pid": 1234, "uptime": "5:42:10" } }, { "id": 2, "name": "nodejs-app", "enabled": true, "status": { "id": 2, "status": "RUNNING", "pid": 1235, "uptime": "5:42:08" } } ]}| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
statuses | array | Status information for all programs |
statuses[].id | integer | Program identifier |
statuses[].name | string | Program name |
statuses[].enabled | boolean | Whether the program is enabled in the configuration |
statuses[].status | object | Runtime status object (see below) |
statuses[].status.status | string | Lifecycle state. One of RUNNING, STOPPED, STARTING, STOPPING, BACKOFF, FATAL |
statuses[].status.pid | integer | Process ID when running, null otherwise |
statuses[].status.uptime | string | Uptime in H:MM:SS format when running, null otherwise |
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. Adds a stats field with pid, started_at, cpu_percent, memory_rss_bytes, process_count, and per-process breakdown. Accepts "true" or "false". |
curl http://localhost:9636/api/v1/daemon/status/1const result = await client.daemon.status.get({ id: 1, include_stats: "true"});Response
Section titled “Response”Program is running
{ "success": true, "status": { "id": 1, "status": "RUNNING", "pid": 1234, "uptime": "2:15:30" }}Program is stopped
{ "success": true, "status": { "id": 1, "status": "STOPPED" }}Program failed to start
{ "success": true, "status": { "id": 1, "status": "FATAL" }}| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
status | object | Runtime status for the program |
status.id | integer | Program identifier |
status.status | string | Lifecycle state. One of RUNNING, STOPPED, STARTING, STOPPING, BACKOFF, FATAL |
status.pid | integer | Process ID when running, null otherwise |
status.uptime | string | Uptime in H:MM:SS format when running, null otherwise |
stats | object | Resource stats for the program’s process tree. Only present when include_stats=true and the program is running |
{ "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. One of stdout (default) or stderr |
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 "http://localhost:9636/api/v1/daemon/programs/1/logs?type=stdout&lines=50"const result = await client.daemon.status.getLogs({ id: 1, type: "stdout", lines: 50});Response
Section titled “Response”{ "success": true, "error": null, "logs": "2026-01-20T08:00:01Z Server started on port 8080\n2026-01-20T08:00:02Z Listening for connections...\n2026-01-20T08:00:05Z Connection accepted from 10.0.0.5", "type": "stdout", "lines": 50, "log_file": "/var/log/hoody/web-server.stdout.log"}| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
error | string | Error message, present when success is false |
logs | string | Log content (last N lines) |
type | string | Log type that was read. One of stdout, stderr |
lines | integer | Number of lines returned |
log_file | string | Path to the log file that was read |
{ "success": false, "error": "Invalid log type"}