Skip to content

The Monitoring & Performance API surface exposes runtime telemetry, request tracking, and lifecycle controls for the hoody-exec script runtime. Use these endpoints to power health checks, scrape Prometheus metrics, audit per-script performance, and orchestrate graceful restarts.

Returns process health, build metadata, and a snapshot of memory and file descriptor usage. Designed for load balancers, container probes, and uptime monitors.

This endpoint takes no parameters.

Terminal window
curl -X GET https://api.hoody.io/api/v1/exec/health

Returns aggregate runtime counters for the exec process, including uptime, memory pressure, cache occupancy, request throughput (lifetime and rolling 1/5/15 minute windows), websocket lifecycle, cron scheduler health, and the number of dropped per-script metric entries.

This endpoint takes no parameters.

Terminal window
curl -X GET https://api.hoody.io/api/v1/exec/monitor/stats

Lists every script HTTP request currently in flight. Each entry includes the execution ID, script path, client metadata, request line, start timestamp, and elapsed milliseconds. Tokens in URLs are redacted.

This endpoint takes no parameters.

Terminal window
curl -X GET https://api.hoody.io/api/v1/exec/monitor/active-requests

Lists tracked scripts with HTTP/websocket performance percentiles, active concurrency, VM cache state, shared-state footprint, and the eight most recent errors per script.

NameInTypeRequiredDescription
limitqueryintegerNoMax number of scripts to return. Clamped to [1, 500]. Default 100.
sortquerystringNoSort key. lastActivity (default) sorts by most recent activity; other keys sort descending by the matching metric. Allowed values: lastActivity, requests, errors, p95, ws_active.
Terminal window
curl -X GET "https://api.hoody.io/api/v1/exec/monitor/scripts?limit=50&sort=p95"

POST /api/v1/exec/monitor/script-performance

Section titled “POST /api/v1/exec/monitor/script-performance”

Returns the detailed metrics object for a single tracked script. The metrics field is an empty object {} when no script identifier can be resolved or the script is not currently tracked — this preserves backward compatibility with older clients.

This endpoint takes no parameters.

The request body is an optional object payload with no defined fields.

Terminal window
curl -X POST https://api.hoody.io/api/v1/exec/monitor/script-performance \
-H "Content-Type: application/json" \
-d '{}'

Exposes the runtime metrics registry in Prometheus 0.0.4 text exposition format. Includes HTTP request/error totals, per-script and global duration histograms (hoody_exec_http_duration_ms, hoody_exec_http_duration_ms_global), websocket connection gauges (hoody_exec_ws_connections_active), close counters (hoody_exec_ws_closes_total), metric-collection error counters, and process_start_time_seconds. Returns 404 when the server was started with --prometheus off.

This endpoint takes no parameters.

Terminal window
curl -X GET https://api.hoody.io/api/v1/exec/monitor/metrics

Reports whether the exec server is currently in a state where a restart can be safely initiated. Includes uptime, the count and identities of in-flight requests, and a restartReady flag that summarizes readiness.

This endpoint takes no parameters.

Terminal window
curl -X GET https://api.hoody.io/api/v1/exec/system/restart-status

Triggers a graceful restart of the exec server. When graceful is enabled, in-flight requests are drained up to drainTimeoutMs before the process is recycled.

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
gracefulbooleanNotrueGraceful
drainTimeoutMsintegerNo5000Drain Timeout Ms
reasonstringNo"API restart request"Reason
Terminal window
curl -X POST https://api.hoody.io/api/v1/exec/system/restart \
-H "Content-Type: application/json" \
-d '{
"graceful": true,
"drainTimeoutMs": 10000,
"reason": "Deploying v1.42.0"
}'