Skip to content
Hoody.com

Use these endpoints to register or deregister a program with supervisord. Enabling activates the program so it can be started; disabling removes it from the supervisord configuration and stops it if it is currently running.

POST /api/v1/daemon/programs/{id}/enable

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

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/1/enable"

POST /api/v1/daemon/programs/{id}/disable

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

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/1/disable"

Use these endpoints to control runtime execution of an enabled program via supervisorctl. Both endpoints support port-range programs: start requires a port to identify the instance, and stop accepts either port for a single instance or all: true for every instance.

POST /api/v1/daemon/programs/{id}/start

Starts the program immediately via supervisorctl. For port-range programs, the port parameter is required to specify which instance to start. Set wait: true to block until the program reaches the RUNNING state. Set if_not_running: true for idempotent calls — useful for edge proxy automation where the same instance may already be running.

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
NameTypeRequiredDefaultDescription
portintegerNoPort number to start. Required for port-range programs. Range: 1–65535.
waitbooleanNofalseWait for the program to reach the RUNNING state before returning.
timeoutintegerNo30Timeout in seconds when wait is true. Range: 1–300.
if_not_runningbooleanNofalseOnly start if the instance is not already running (idempotent mode). When true, the response includes an already_running field. Recommended for edge proxy automation.

Start a standard program:

Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/1/start" \
-H "Content-Type: application/json" \
-d '{}'

Start a specific port instance and wait for the RUNNING state:

Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/2/start" \
-H "Content-Type: application/json" \
-d '{"port": 8042, "wait": true, "timeout": 60}'

Idempotent start for edge proxy automation:

Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/2/start" \
-H "Content-Type: application/json" \
-d '{"port": 8042, "if_not_running": true}'

POST /api/v1/daemon/programs/{id}/stop

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

NameInTypeRequiredDescription
idpathintegerYesUnique numeric identifier of the program
NameTypeRequiredDefaultDescription
portintegerNoSpecific port to stop. Range: 1–65535.
allbooleanNoStop all instances of a port-range program. Mutually exclusive with port.

Stop a standard program:

Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/1/stop" \
-H "Content-Type: application/json" \
-d '{}'

Stop a specific port instance:

Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/2/stop" \
-H "Content-Type: application/json" \
-d '{"port": 8042}'

Stop every instance of a port-range program:

Terminal window
curl -X POST "https://proj-acme-webapp-daemon-1.us-east-1.containers.hoody.icu/api/v1/daemon/programs/2/stop" \
-H "Content-Type: application/json" \
-d '{"all": true}'