Skip to content
Hoody.com

Use these endpoints to enable, disable, start, and stop daemon programs managed by supervisord. Enable and disable change a program’s registration state — a disabled program is removed from supervisord’s configuration and cannot run. Start and stop control whether an enabled program is currently executing. For programs registered with lazy_load: true, the start endpoint is the call Hoody Proxy makes to bring an instance up on the first incoming request that routes to its port.

Enable and disable toggle whether supervisord knows about a program at all. Disabling a running program stops it as part of the same call.

Enables the program and registers it with supervisord. Use this to activate a previously disabled program.

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
{
"success": true,
"program": {
"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": {},
"directory": "/var/www",
"priority": 999
}
}
Terminal window
curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/1/enable" \
-H "Authorization: Bearer <token>"

Disables the program and removes it from supervisord configuration. The program will be stopped if currently running.

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
{
"success": true,
"program": {
"id": 1,
"name": "web-server",
"description": "Nginx web server",
"enabled": false,
"command": "nginx -g \"daemon off;\"",
"boot": true,
"delay_seconds": 5,
"autorestart": "unexpected",
"user": "www-data",
"environment": {},
"directory": "/var/www",
"priority": 999
}
}
Terminal window
curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/1/disable" \
-H "Authorization: Bearer <token>"

Start and stop act on an enabled program immediately via supervisorctl. Port-range programs are multi-instance — each port in the configured range is a separate running process — and these endpoints address one instance at a time unless all: true is sent to stop.

Starts the program immediately via supervisorctl. For port-range programs, the port parameter is required to specify which instance to start. The optional wait parameter blocks until the program reaches the RUNNING state, and if_not_running makes the call idempotent.

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
FieldTypeRequiredDefaultDescription
portintegerNo (required for port-range programs)Port number to start (required for port-range programs)
waitbooleanNofalseWait for program to reach RUNNING state before returning
timeoutintegerNo30Timeout in seconds when wait=true
if_not_runningbooleanNofalseOnly start if not already running (idempotent mode). If true, checks if instance is running first. Returns already_running field in response. Use this for edge proxy automation.
{
"port": 8042
}
{
"success": true,
"instance": {
"port": 8042,
"instance_name": "api-server_8042",
"status": "starting"
}
}
Terminal window
curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/1/start" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"port": 8042, "wait": true, "timeout": 60}'

Stops the program immediately via supervisorctl. For port-range programs, specify port to stop a specific instance or all: true to stop every instance.

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
FieldTypeRequiredDefaultDescription
portintegerNoSpecific port to stop
allbooleanNoStop all instances (for port-range programs)
{
"port": 8042
}
{
"success": true
}
Terminal window
curl -X POST "https://{projectId}-{containerId}-daemon-1.{server}.containers.hoody.com/api/v1/daemon/programs/1/stop" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"all": true}'