Daemon Management
Section titled “Daemon Management”The Hoody Container Daemon supervises long-running programs through supervisord. This page documents the endpoints for listing, inspecting, creating, editing, removing, and resetting supervised programs, plus launching and managing ephemeral (Quick Start) programs. Use these endpoints whenever you need to add a custom service to a container, change an existing program’s settings, run a one-off task, or reset to a clean default configuration.
All endpoints in this page are reached through the container’s daemon-1 hostname: https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com.
Programs
Section titled “Programs”GET /api/v1/daemon/programs
Section titled “GET /api/v1/daemon/programs”Lists every configured program. Combine the filters to narrow the result by hoody_kit, lazy_load, enabled, or boot status. Use the port filters to find the program that owns a specific port or that overlaps with a port range. Pass include_status=true to attach runtime status to each entry, or include_stats=true for CPU and memory stats.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
hoody_kit | query | string | No | Filter by hoody_kit status. Use "true" for Kit programs only, "false" for user programs. |
lazy_load | query | string | No | Filter by lazy_load status. Use "true" for lazy-loaded programs, "false" for auto-start programs. |
enabled | query | string | No | Filter by enabled status. |
boot | query | string | No | Filter by boot status. Use "true" for auto-start on boot, "false" for manual-start. |
port | query | integer | No | Filter by a single port. Returns only programs whose port_range includes this port. Example: ?port=8042. |
port_from | query | integer | No | Filter by port range start. Must be used with port_to. Returns programs whose port ranges overlap using program.start <= port_to AND program.end >= port_from. |
port_to | query | integer | No | Filter by port range end. Must be used with port_from. |
include_status | query | string | No | Include runtime status for each program. Adds a status field with the current state, instances, and process details. |
include_stats | query | string | No | Include CPU and memory stats. Implies include_status=true. Adds a stats field with pid, started_at, cpu_percent, memory_rss_bytes, process_count, and a per-process breakdown. Only present for running programs. |
The boolean query parameters (hoody_kit, lazy_load, enabled, boot, include_status, include_stats) are strict: only true or false (case-insensitive). Values such as 1, yes, on, or empty return HTTP 400.
Response
Section titled “Response”curl -X GET "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs?include_status=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 });
const { programs } = await client.daemon.programs.list({ include_status: 'true' });{ "programs": [ { "id": 1, "name": "web-server", "description": "Nginx web server", "enabled": true, "command": "nginx -g \"daemon off;\"", "boot": true, "delay_seconds": 5, "autorestart": "unexpected", "user": "www-data", "environment": { "NGINX_PORT": "80" }, "directory": "/var/www", "priority": 999, "stdout_logfile": "/hoody/storage/hoody-daemon/logs/web-server/stdout.log", "stderr_logfile": "/hoody/storage/hoody-daemon/logs/web-server/stderr.log", "lazy_load": false, "hoody_kit": false }, { "id": 7, "name": "hoody-notes", "enabled": true, "command": "node /hoody/plugins/hoody-notes/server.js", "boot": false, "user": "root", "port_range": { "start": 8042, "end": 8042 }, "port_param": "--port", "lazy_load": true, "hoody_kit": true } ]}{ "programs": []}{ "success": false, "error": "Invalid query parameter value: include_stats must be 'true' or 'false'"}GET /api/v1/daemon/programs/{id}
Section titled “GET /api/v1/daemon/programs/{id}”Retrieves detailed configuration for a single program by its numeric ID.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Unique numeric identifier of the program. |
Response
Section titled “Response”curl -X GET "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/1" \ -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 });
const { program } = await client.daemon.programs.get(1);{ "success": true, "program": { "id": 1, "name": "nodejs-app", "description": "Production Node.js application", "enabled": true, "command": "node server.js", "boot": true, "delay_seconds": 5, "autorestart": "unexpected", "user": "nodejs", "environment": { "NODE_ENV": "production" }, "directory": "/opt/myapp", "priority": 999, "stdout_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stdout.log", "stderr_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stderr.log", "lazy_load": false, "hoody_kit": false }}{ "success": false, "error": "Program with ID 999 not found"}POST /api/v1/daemon/programs/add
Section titled “POST /api/v1/daemon/programs/add”Creates a new custom program. The program is validated and added to programs.json. It is applied to supervisord only when it is enabled AND has either boot: true or a port_range; an enabled program with neither is registered but not started.
Request Body
Section titled “Request Body”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | No | Specific ID to assign (auto-assigned if omitted). |
name | string | Yes | Program name (must be unique; cannot contain quotes). |
description | string | No | Human-readable description. |
command | string | Yes | Command to execute with full arguments for your custom program. Use only for custom code; system services belong under systemctl. |
user | string | Yes | System user (must exist on the system). |
enabled | boolean | No | Enable the program immediately. Default: true. |
boot | boolean | No | Start automatically on system boot. Default: false. Cannot be true when lazy_load is true. |
delay_seconds | integer | No | Seconds the program must stay running for supervisord to consider the start successful (supervisord’s startsecs). Default: 0. |
autorestart | string | No | Restart policy: "true", "false", or "unexpected". Default: "unexpected". |
directory | string | No | Working directory path (defaults to user home if omitted). |
priority | integer | No | Start priority (1-999, lower starts first). Default: 999. |
stdout_logfile | string | No | Absolute path for standard output log. Must be under /hoody/storage/hoody-daemon/logs. Example: /hoody/storage/hoody-daemon/logs/<name>/stdout.log. |
stderr_logfile | string | No | Absolute path for standard error log. Must be under /hoody/storage/hoody-daemon/logs. Example: /hoody/storage/hoody-daemon/logs/<name>/stderr.log. |
logs_enabled | boolean | No | Whether logging is enabled. Default: true. |
log_max_bytes | integer | No | Maximum size of each log file in bytes before rotation. Default: 5242880 (5MB). |
log_backups | integer | No | Number of rotated backup log files to keep. Default: 2. |
environment | object | No | Environment variables as key-value pairs (string values). |
port_range | object | No | Port range for multi-instance programs. Each port in the range creates a separate instance. Object with start and end (1-65535, max 4096 ports). Ranges must not overlap other programs’ ranges. |
port_param | string | No | CLI flag used to pass the port to the command (server default --port). Valid only together with port_range; an empty string is rejected. |
lazy_load | boolean | No | When true, the program is not started automatically. Default: false. Requires port_range for proxy-driven activation. Cannot be combined with boot: true. |
display | string | No | X11 DISPLAY number for GUI programs (e.g. ":1" or "1"). |
terminal_id | integer | No | Hoody Terminal integration: Session ID (1-65535). |
terminal_shell | string | No | Hoody Terminal integration: shell. One of bash, zsh, fish, sh, tmux. Requires terminal_id. |
terminal_interactive | boolean | No | Hoody Terminal integration: override auto-detection. true = interactive, false = service, omitted = auto-detect. |
webhooks | object | No | Webhook notification configuration. Object with enabled, urls, events, headers, timeout, retry. |
hoody_kit | boolean | No | Read-only. Server-derived: true when the program’s working directory is under /hoody/plugins, OR when it carries an official Kit name and its executable lives under /hoody/plugins (this is what classifies hoody-agent). Any value supplied in the body is ignored. |
Response
Section titled “Response”curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/add" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "name": "nodejs-app", "description": "Production Node.js application", "command": "node server.js", "user": "nodejs", "enabled": true, "boot": true, "delay_seconds": 10, "autorestart": "unexpected", "directory": "/opt/myapp", "priority": 100, "environment": { "NODE_ENV": "production", "PORT": "3000" }, "stdout_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stdout.log", "stderr_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stderr.log" }'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
const result = await client.daemon.programs.add({ name: 'nodejs-app', description: 'Production Node.js application', command: 'node server.js', user: 'nodejs', enabled: true, boot: true, delay_seconds: 10, autorestart: 'unexpected', directory: '/opt/myapp', priority: 100, environment: { NODE_ENV: 'production', PORT: '3000' }, stdout_logfile: '/hoody/storage/hoody-daemon/logs/nodejs-app/stdout.log', stderr_logfile: '/hoody/storage/hoody-daemon/logs/nodejs-app/stderr.log'});{ "success": true, "program": { "id": 2, "name": "nodejs-app", "description": "Production Node.js application", "enabled": true, "command": "node server.js", "boot": true, "delay_seconds": 10, "autorestart": "unexpected", "user": "nodejs", "environment": { "NODE_ENV": "production", "PORT": "3000" }, "directory": "/opt/myapp", "priority": 100, "stdout_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stdout.log", "stderr_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stderr.log", "lazy_load": false, "hoody_kit": false }}{ "success": false, "error": "Programs with lazy_load enabled cannot have boot enabled. Lazy-loaded programs are started on-demand by Hoody Proxy."}{ "success": false, "error": "User worker does not exist"}{ "success": false, "error": "Invalid stdout_logfile path: must be under /hoody/storage/hoody-daemon/logs"}{ "success": false, "error": "Port range 8000-9000 overlaps with program \"web-server\" (ID 1) range 8000-8999."}POST /api/v1/daemon/programs/edit/{id}
Section titled “POST /api/v1/daemon/programs/edit/{id}”Updates an existing program configuration. Only provided fields are updated; unspecified fields retain their current values.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Unique numeric identifier of the program. |
Request Body
Section titled “Request Body”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | No | Specific ID to assign. |
name | string | No | Program name (must be unique; cannot contain quotes). |
description | string | No | Human-readable description. |
command | string | No | Command to execute with full arguments for your custom program. |
user | string | No | System user (must exist on the system). |
enabled | boolean | No | Enable the program immediately. |
boot | boolean | No | Start automatically on system boot. Cannot be true when lazy_load is true. |
delay_seconds | integer | No | Seconds the program must stay running for supervisord to consider the start successful (supervisord’s startsecs). |
autorestart | string | No | Restart policy: "true", "false", or "unexpected". |
directory | string | No | Working directory path. |
priority | integer | No | Start priority (1-999, lower starts first). |
stdout_logfile | string | No | Absolute path for standard output log. Must be under /hoody/storage/hoody-daemon/logs. |
stderr_logfile | string | No | Absolute path for standard error log. Must be under /hoody/storage/hoody-daemon/logs. |
logs_enabled | boolean | No | Whether logging is enabled. |
log_max_bytes | integer | No | Maximum size of each log file in bytes before rotation. |
log_backups | integer | No | Number of rotated backup log files to keep. |
environment | object | No | Environment variables as key-value pairs (string values). |
port_range | object | No | Port range for multi-instance programs. Object with start and end (1-65535, max 4096 ports). The program’s own range is excluded from overlap checks. |
port_param | string | No | CLI flag used to pass the port to the command. Valid only together with port_range. |
lazy_load | boolean | No | When true, the program is not started automatically. Cannot be combined with boot: true. |
display | string | No | X11 DISPLAY number for GUI programs. |
terminal_id | integer | No | Hoody Terminal integration: Session ID (1-65535). |
terminal_shell | string | No | Hoody Terminal integration: shell. One of bash, zsh, fish, sh, tmux. Requires terminal_id. |
terminal_interactive | boolean | No | Hoody Terminal integration: override auto-detection. |
webhooks | object | No | Webhook notification configuration. |
hoody_kit | boolean | No | Read-only. Server-derived; any value supplied is ignored. |
Response
Section titled “Response”curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/edit/1" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated description", "command": "node server.js --production", "environment": { "NODE_ENV": "production", "PORT": "8080" } }'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
const { program } = await client.daemon.programs.edit(1, { description: 'Updated description', command: 'node server.js --production', environment: { NODE_ENV: 'production', PORT: '8080' }});{ "success": true, "program": { "id": 1, "name": "nodejs-app", "description": "Updated description", "enabled": true, "command": "node server.js --production", "boot": true, "delay_seconds": 10, "autorestart": "unexpected", "user": "nodejs", "environment": { "NODE_ENV": "production", "PORT": "8080" }, "directory": "/opt/myapp", "priority": 100, "stdout_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stdout.log", "stderr_logfile": "/hoody/storage/hoody-daemon/logs/nodejs-app/stderr.log", "lazy_load": false, "hoody_kit": false }}{ "success": false, "error": "Program with ID 999 not found"}{ "success": false, "error": "Programs with lazy_load enabled cannot have boot enabled. Lazy-loaded programs are started on-demand by Hoody Proxy."}{ "success": false, "error": "port_param requires port_range to be set. Use port_range to define the port range for multi-instance programs."}{ "success": false, "error": "Invalid port_param format: \"\""}{ "success": false, "error": "Port range too large (max 4096 ports)"}POST /api/v1/daemon/programs/remove/{id}
Section titled “POST /api/v1/daemon/programs/remove/{id}”Permanently deletes a program from the configuration. If the program is running, it is stopped before removal. This is a destructive operation that cannot be undone.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Unique numeric identifier of the program. |
Response
Section titled “Response”curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/remove/1" \ -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 });
const { id } = await client.daemon.programs.remove(1);{ "success": true, "id": 1}{ "success": false, "error": "Program with ID 999 not found"}POST /api/v1/daemon/programs/reset
Section titled “POST /api/v1/daemon/programs/reset”Replaces the current programs.json with the initial default snapshot (/hoody/storage/hoody-daemon/config/programs.default.json) created at container setup time. Stops all managed programs, removes their supervisord configs, and re-applies the default boot programs. Use this when programs have been misconfigured and a clean slate is needed.
Response
Section titled “Response”curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/reset" \ -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 });
const result = await client.daemon.programs.reset();{ "success": true}{ "success": false, "error": "Default programs file not found at '/hoody/storage/hoody-daemon/config/programs.default.json': No such file or directory. Cannot reset."}{ "success": false, "error": "Failed to parse default programs file: unexpected EOF"}Lazy loading
Section titled “Lazy loading”lazy_load: true (boolean, default false) tells the daemon to register a program without starting it. The program stays in programs.json and costs nothing until something asks for it. This is how most of the Hoody Kit behaves already — a container is not running fourteen daemons, it is running the ones someone has actually opened. Of the 18 Kit programs shipped, 13 are registered with lazy_load: true: hoody-browser, hoody-code, hoody-curl, hoody-display, hoody-exec, hoody-files, hoody-notes, hoody-notifications, hoody-pipe, hoody-run, hoody-sqlite, hoody-tunnel, and hoody-workspaces. The remaining 5 (hoody-agent, hoody-cron, hoody-egress, hoody-watch, and hoody-terminal when the terminal kit is enabled) are registered eagerly.
The mechanism differs by program shape:
- With
port_range:lazy_loadexplicitly rendersautostart=false, and every port in the range becomes its own registered-but-not-running instance. Hoody Proxy can then ask the daemon for the program owning a given port and start it. - Without
port_range: supervisord’sautostartfollowsbootdirectly. The API’s rejection oflazy_load: true+boot: trueis what forcesautostarttofalsein this case.
What happens on the first request:
- A user (or agent) opens
https://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com. Nothing is listening yet becausehoody-notesis registeredlazy_load: true. - The proxy resolves the port from the hostname, then queries the daemon:
GET /api/v1/daemon/programs?lazy_load=true&port={port}&include_status=true. - If a matching enabled program is not RUNNING, the proxy calls
POST /api/v1/daemon/programs/{id}/startwith{ "if_not_running": true, "wait": true, "timeout": 30 }(plus"port"for a port-range program). The proxy HOLDS the client request until the process reaches RUNNING, then proxies it. The caller sees one slow request, not an error. If the start fails or the wait times out, the proxy does NOT fail the request — it continues with normal proxying. - Later requests hit a short per-port cache and pay nothing. The 30-second start timeout and the 5-second cache are defaults an operator can change (
SOCKET_ACTIVATION_START_TIMEOUT/SOCKET_ACTIVATION_CACHE_LIFETIME).
lazy_load: true together with boot: true is rejected on create and edit with HTTP 400. The daemon returns the validator’s message verbatim:
Programs with lazy_load enabled cannot have boot enabled. Lazy-loaded programs are started on-demand by Hoody Proxy.Quick Start
Section titled “Quick Start”Quick Start launches ephemeral (temporary) programs that are NOT saved to programs.json. They live in ephemeral.json for crash recovery and are reaped automatically.
Lifecycle
Section titled “Lifecycle”Ephemeral IDs have the format quick_<milliseconds>_<sequence> (for example, quick_1731605123000_0). Default ephemeral log paths are keyed on the program NAME: /hoody/storage/hoody-daemon/logs/<name>/stdout.log.
Cleanup is NOT simply “on exit”. STOPPED and FATAL are always reaped, but EXITED is reaped only when restart is disabled. Under the default autorestart: "unexpected", an exited job is retained until TTL, manual stop, or reboot.
POST /api/v1/daemon/quick-start
Section titled “POST /api/v1/daemon/quick-start”Creates and starts a temporary custom program that auto-cleans when stopped or on container reboot.
Request Body
Section titled “Request Body”| Name | Type | Required | Description |
|---|---|---|---|
command | string | Yes | Command to execute with full arguments for your custom program or script. Custom code only; system services belong under systemctl. |
user | string | Yes | System user to run as (must exist on the system). |
name | string | No | Custom name (auto-generated if omitted). Cannot contain quotes. |
autorestart | string | No | Restart policy while running: "true" (always), "false" (never), "unexpected" (only on crashes). Default: "unexpected". |
directory | string | No | Working directory (defaults to user home if not specified). |
environment | object | No | Environment variables as key-value pairs (string values). |
priority | integer | No | Start priority (1-999, lower starts first). Default: 999. |
delay_seconds | integer | No | Seconds the program must stay running for supervisord to consider the start successful. Default: 0. |
stdout_logfile | string | No | Absolute path for standard output log. Must be under /hoody/storage/hoody-daemon/logs. Example: /hoody/storage/hoody-daemon/logs/<name>/stdout.log. |
stderr_logfile | string | No | Absolute path for standard error log. Must be under /hoody/storage/hoody-daemon/logs. Example: /hoody/storage/hoody-daemon/logs/<name>/stderr.log. |
logs_enabled | boolean | No | Whether logging is enabled. Default: true. |
log_max_bytes | integer | No | Maximum size of each log file in bytes before rotation. Default: 5242880 (5MB). |
log_backups | integer | No | Number of rotated backup log files to keep. Default: 2. |
ttl | integer | No | Time-to-live in seconds. Program auto-stops after this duration. |
wait | boolean | No | Wait for program to reach RUNNING state before returning. Default: false. |
timeout | integer | No | Timeout in seconds when wait=true. Default: 30. Clamped to 300. |
display | string | No | X11 DISPLAY number for GUI programs. Accepts both "1" and ":1" formats. |
terminal_id | integer | No | Hoody Terminal integration: Session ID (1-65535). |
terminal_shell | string | No | Hoody Terminal integration: shell. One of bash, zsh, fish, sh, tmux. |
terminal_interactive | boolean | No | Hoody Terminal integration: override auto-detection. |
Response
Section titled “Response”curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/quick-start" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "command": "node test-server.js", "user": "nodejs", "name": "temp-test-server", "directory": "/opt/test", "ttl": 1800, "environment": { "PORT": "9999", "NODE_ENV": "test" }, "wait": true }'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
const result = await client.daemon.quickStart.launch({ command: 'node test-server.js', user: 'nodejs', name: 'temp-test-server', directory: '/opt/test', ttl: 1800, environment: { PORT: '9999', NODE_ENV: 'test' }, wait: true});{ "success": true, "temporary_id": "quick_1731605123000_0", "name": "temp-test-server", "status": "running", "created_at": "2024-11-14T18:32:03Z"}{ "success": true, "temporary_id": "quick_1731605456000_0", "name": "temp-test-server", "status": "starting", "created_at": "2024-11-14T18:37:36Z"}{ "success": true, "temporary_id": "quick_1731605789000_0", "name": "temp-test-server", "status": "running", "created_at": "2024-11-14T18:42:09Z", "expires_at": "2024-11-14T19:12:09Z"}{ "success": false, "error": "Missing required field: command"}{ "success": false, "error": "User worker does not exist"}{ "success": false, "error": "Directory /opt/nonexistent does not exist"}{ "success": false, "error": "Invalid program name: contains quotes"}GET /api/v1/daemon/quick-start
Section titled “GET /api/v1/daemon/quick-start”Returns all currently tracked ephemeral programs with their current runtime status.
Response
Section titled “Response”curl -X GET "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/quick-start" \ -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 });
const { ephemeral_programs } = await client.daemon.quickStart.list();{ "success": true, "count": 2, "ephemeral_programs": [ { "temporary_id": "quick_1731605123000_0", "name": "quick_python_1731605123", "command": "python batch-job.py", "user": "worker", "status": "running", "pid": 12345, "uptime": "0:05:32", "created_at": "2024-11-14T18:32:03Z" }, { "temporary_id": "quick_1731605456000_0", "name": "my-temp-server", "command": "node server.js", "user": "nodejs", "status": "running", "pid": 12350, "uptime": "0:00:08", "created_at": "2024-11-14T18:37:36Z", "expires_at": "2024-11-14T19:37:36Z" } ]}{ "success": true, "count": 0, "ephemeral_programs": []}GET /api/v1/daemon/quick-start/{id}/status
Section titled “GET /api/v1/daemon/quick-start/{id}/status”Retrieves the current runtime status for a specific ephemeral program by its temporary_id.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Temporary ID of the ephemeral program (format: quick_<milliseconds>_<sequence>). |
Response
Section titled “Response”curl -X GET "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/quick-start/quick_1731605123000_0/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 });
const result = await client.daemon.quickStart.getStatus('quick_1731605123000_0');{ "success": true, "temporary_id": "quick_1731605123000_0", "name": "quick_python_1731605123", "status": "running", "pid": 12345, "uptime": "0:15:30", "created_at": "2024-11-14T18:32:03Z"}{ "success": true, "temporary_id": "quick_1731605456000_0", "name": "my-temp-server", "status": "stopped", "created_at": "2024-11-14T18:37:36Z"}{ "success": true, "temporary_id": "quick_1731605789000_0", "name": "my-temp-server", "status": "running", "pid": 12360, "uptime": "0:01:10", "created_at": "2024-11-14T18:42:09Z", "expires_at": "2024-11-14T19:12:09Z"}{ "success": false, "error": "Ephemeral program quick_1731605999999_0 not found"}GET /api/v1/daemon/quick-start/{id}/logs
Section titled “GET /api/v1/daemon/quick-start/{id}/logs”Retrieves the last N lines from an ephemeral program’s stdout or stderr log file. Default ephemeral log paths are keyed on the program NAME: /hoody/storage/hoody-daemon/logs/<name>/stdout.log.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Ephemeral program temporary 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. |
Response
Section titled “Response”curl -X GET "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/quick-start/quick_1731605123000_0/logs?type=stdout&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 });
const result = await client.daemon.quickStart.getEphemeralLogs('quick_1731605123000_0', { type: 'stdout', lines: 50 });{ "success": true, "logs": "2024-11-14T18:32:03Z starting batch job\n2024-11-14T18:32:04Z processed 1024 records\n2024-11-14T18:32:05Z processed 2048 records\n", "type": "stdout", "lines": 3, "log_file": "/hoody/storage/hoody-daemon/logs/quick_python_1731605123/stdout.log"}{ "success": false, "error": "Invalid log type. Must be 'stdout' or 'stderr'."}{ "success": false, "error": "Ephemeral program quick_1731605999999_0 not found"}POST /api/v1/daemon/quick-start/{id}/stop
Section titled “POST /api/v1/daemon/quick-start/{id}/stop”Stops the ephemeral program and removes its configuration completely. The program cannot be restarted — to run the same command again, create a new ephemeral program.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Temporary ID of the ephemeral program to stop. |
Response
Section titled “Response”curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/quick-start/quick_1731605123000_0/stop" \ -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.quickStart.stop('quick_1731605123000_0');{ "success": true, "temporary_id": "quick_1731605123000_0", "cleaned_up": true, "message": "Program stopped and configuration removed"}{ "success": false, "error": "Ephemeral program quick_1731605999999_0 not found"}