Skip to content
Hoody.com

The Proxy Logs API provides centralized access to request/response and event logs captured by the Hoody proxy layer. Use these endpoints to query historical log entries, retrieve aggregate statistics, and live-tail log activity as it happens via Server-Sent Events.

All log endpoints are scoped to the container that hosts the proxy logs service. Authentication is performed with a logs token supplied by the platform; requests that omit a valid token or violate the gateway policy are rejected.

GET /_logs

Search and filter through the stored request, response, and event logs. Results can be scoped by project, container, service, severity, kind, HTTP method, and source. Use the kind parameter to distinguish proxy traffic (request, response) from internal events (event), and source to differentiate backend logs from edge logs.

NameInTypeRequiredDescription
limitqueryintegerNoMaximum number of entries to return. Default: 200.
offsetqueryintegerNoNumber of entries to skip before returning results. Default: 0.
projectIdquerystringNoRestrict results to a single project.
containerIdquerystringNoRestrict results to a single container.
serviceNamequerystringNoRestrict results to a single service.
levelquerystringNoComma-separated levels (debug,info,warn,error).
includeRequestBodyquerybooleanNoInclude the captured request body in each entry. Default: false.
includeResponseBodyquerybooleanNoInclude the captured response body in each entry. Default: false.
lastqueryintegerNoReturn only the last N entries.
afterIdqueryintegerNoReturn entries with SQLite row ID greater than this (ASC cursor).
cursorquerystringNoPagination cursor (signed opaque base64).
kindquerystringNoFilter by entry kind. Allowed values: request, response, event.
methodquerystringNoFilter by HTTP method.
sourcequerystringNoFilter by log source. Allowed values: backend, edge.
Terminal window
curl -G "https://{projectId}-{containerId}-logs-1.{serverName}.containers.hoody.com/_logs" \
-H "Authorization: Bearer <token>" \
--data-urlencode "level=info,warn" \
--data-urlencode "kind=request,response" \
--data-urlencode "limit=50"

GET /_logs/stats

Return aggregate counts of stored log entries, broken down by level, project, container, and service.

This endpoint takes no parameters.

Terminal window
curl "https://{projectId}-{containerId}-logs-1.{serverName}.containers.hoody.com/_logs/stats" \
-H "Authorization: Bearer <token>"

GET /_logs/stream

Open a persistent Server-Sent Events connection that streams new log entries as they arrive. Every frame includes an id: <ringSeq> line that clients can use to resume after a disconnect.

Framing - each frame carries an id: line followed by a data: line containing the log entry as JSON:

id: 12345
data: {"id": 12345, "tsMs": 1718225400123, ...}

Reconnect resume - clients may send Last-Event-ID: <ringSeq> on reconnect; the server skips any frame with ringSeq <= Last-Event-ID from the ring buffer (5000 entries / approximately 50 seconds replay window at 100 entries/s).

Named events (v8 contract):

  • event: scope-destroyed - the container was destroyed; the stream closes immediately after. Clients should exit cleanly.
  • event: reset - the server restarted and the ringSeq counter has been reset with a >= 10000 safety margin. Clients must discard their lastSeenId and reconnect fresh.

Periodic :\n\n heartbeats are emitted every 15 seconds to keep the connection alive.

NameInTypeRequiredDescription
projectIdquerystringNoFilter to a single project.
containerIdquerystringNoFilter to a single container.
kindquerystringNoFilter by entry kind. Allowed values: request, response, event.
levelquerystringNoFilter by severity. Allowed values: debug, info, warn, error.
Last-Event-IDheaderstringNoNumeric ringSeq of the last event received. Server skips entries with ringSeq <= Last-Event-ID from the ring buffer on reconnect.
Terminal window
curl -N "https://{projectId}-{containerId}-logs-1.{serverName}.containers.hoody.com/_logs/stream?level=error" \
-H "Authorization: Bearer <token>" \
-H "Last-Event-ID: 12340"