Skip to content
Hoody.com

The Hoody Tunnel kit service exposes HTTP endpoints for inspecting and managing active tunnel sessions, bindings, and streams inside a container. It also serves the multiplexed WebSocket control plane that clients connect to in order to register EXPOSE and PULL bindings. Use these endpoints to monitor tunnel activity, scrape Prometheus metrics, or terminate rogue sessions from the control plane.

All endpoints are served from the tunnel kit’s container hostname: https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com. Replace {projectId} and {containerId} with the 24-character hexadecimal project and container identifiers, and {serverName} with the server node label (for example node-us).

Returns kit health status including runtime version, memory usage, open file descriptor count, process ID, and client user agent. No authentication is required.

This endpoint takes no parameters.

Terminal window
curl https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/health

Returns Prometheus text-format metrics covering active sessions, active bindings, and FD permit budget.

This endpoint takes no parameters.

Terminal window
curl https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/metrics

Returns all active tunnel sessions with their bindings, stream counts, and protocol version.

This endpoint takes no parameters.

Terminal window
curl https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/sessions

DELETE /api/v1/tunnel/sessions/{session_id}

Section titled “DELETE /api/v1/tunnel/sessions/{session_id}”

Signals the tunnel kit to close the named session. Live sessions receive a GOAWAY(0x0001, "closed by admin") frame sent directly on the WebSocket and are force-closed after grace_ms elapses. Admin kills are non-resumable (orphan parking is skipped).

NameInTypeRequiredDescription
session_idpathstringYesSession ID as returned by GET /sessions
grace_msqueryintegerNoGOAWAY drain budget in ms (0-5000, default 50)
Terminal window
curl -X DELETE \
'https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/sessions/sess_01HMZ8X3KQ9F2VNA7B4YTRWPCE?grace_ms=200'

Returns all active EXPOSE and PULL bindings across every session, with the owning session, port, kind, mode, and bind ID.

This endpoint takes no parameters.

Terminal window
curl https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/bindings

Returns a unified view of all active tunnel sessions, including expose and pull bindings, stream counts, orphan count, and FD budget status.

This endpoint takes no parameters.

Terminal window
curl https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/tunnels

WebSocket upgrade endpoint for the multiplexed tunnel session. Clients MUST request subprotocol hoody-tunnel.v1 or hoody-tunnel.v2 and send a HELLO frame as the first binary message. The response header x-hoody-tunnel-versions lists the supported subprotocol versions when the request is rejected.

This endpoint takes no parameters.

Terminal window
curl -i \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Protocol: hoody-tunnel.v1" \
https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.com/api/v1/tunnel/connect