Skip to content
Hoody.com

Monitor runtime health, inspect in-flight script requests, aggregate per-script metrics, scrape Prometheus-compatible metrics, and restart the exec server when needed. Use these endpoints to build dashboards, alerting, and operational tooling around the Hoody exec runtime.

All endpoints below are scoped to a specific project container and are served from the container-scoped subdomain pattern https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu. Replace {projectId}, {containerId}, and {server} with your values.


Lightweight liveness probe. Returns runtime metadata (build timestamp, start time, memory, PID, file descriptor count) without touching any heavy subsystems. Safe to call from load balancers and uptime monitors.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/health"

Inspects whether the exec server can safely be restarted right now. Reports uptime, the count of in-flight requests, and whether each in-flight request is still active. Use this before calling POST /api/v1/exec/system/restart to decide between graceful and forced drains.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/system/restart-status"

Returns every in-flight script HTTP request currently being handled by the exec server. Each entry includes the script path, method, URL (with the auth token redacted), and the elapsed duration in milliseconds. Useful for live debugging when requests appear to be stuck.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/monitor/active-requests"

Returns lifetime runtime counters: uptime, memory usage, cache sizes, request totals with rolling averages (1m / 5m / 15m), WebSocket counters, and cron scheduler counters. Use this for top-level dashboards and alerting thresholds.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/monitor/stats"

Lists every tracked script with per-script HTTP and WebSocket metrics, including latency percentiles, error counts, and a small ring buffer of recent errors. Sort by activity, volume, errors, or latency to find hot or slow scripts.

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: lastActivity, requests, errors, p95, ws_active. Default "lastActivity".
Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/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 runtime metrics for tracked scripts, including HTTP latency percentiles, recent duration samples, WebSocket session stats, and active request counts. The request body is empty, so the response always contains an empty metrics object {}.

This endpoint takes no path, query, or header parameters.

Terminal window
curl -X POST "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/monitor/script-performance"

Exposes runtime counters in Prometheus 0.0.4 text exposition format. Scrape this endpoint from a Prometheus collector to feed Grafana dashboards. The response includes hoody_exec_http_requests_total, hoody_exec_http_errors_total, hoody_exec_http_duration_ms (per-script histogram), hoody_exec_http_duration_ms_global (aggregate histogram), hoody_exec_ws_connections_active, hoody_exec_ws_closes_total, hoody_exec_metrics_errors_total, and process_start_time_seconds.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/monitor/metrics"

Triggers a restart of the exec server. By default the restart is graceful: in-flight requests are drained for up to drainTimeoutMs before the process exits. Call GET /api/v1/exec/system/restart-status first to inspect how many requests are still active.

NameTypeRequiredDefaultDescription
gracefulbooleanNotrueWhen true, drain in-flight requests before exiting.
drainTimeoutMsintegerNo5000Maximum time to wait for in-flight requests to complete during a graceful restart, in milliseconds.
reasonstringNo"API restart request"Free-form string recorded in the restart audit log.

This endpoint takes no path, query, or header parameters.

Terminal window
curl -X POST "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu/api/v1/exec/system/restart" \
-H "Content-Type: application/json" \
-d '{
"graceful": true,
"drainTimeoutMs": 10000,
"reason": "Deploying new script bundle"
}'