Skip to content

The Proxy Logs API provides centralized access to request, response, and event logs produced by the Hoody proxy. Use these endpoints to search historical logs, retrieve aggregate statistics, and stream new entries in real time over Server-Sent Events.

GET /_logs

Search and filter through the stored request/response and event logs. Results are scoped to the authenticated project by default; admin callers can opt into cross-tenant fanout using the cursor parameter when LOGS_ADMIN_FANOUT=true.

NameInTypeRequiredDescription
limitqueryintegerNoMaximum entries to return. Default: 200.
offsetqueryintegerNoNumber of entries to skip. Default: 0.
projectIdquerystringNoFilter to a single project.
containerIdquerystringNoFilter to a single container.
serviceNamequerystringNoFilter to a single service.
levelquerystringNoComma-separated levels (debug,info,warn,error).
includeRequestBodyquerybooleanNoInclude the request body in entries. Default: false.
includeResponseBodyquerybooleanNoInclude the response body in entries. Default: false.
lastqueryintegerNoReturn only the last N entries.
afterIdqueryintegerNoReturn entries with SQLite row ID greater than this (ASC cursor).
cursorquerystringNov8 §5.2 — cross-tenant fanout pagination cursor (signed opaque base64). Only honored when LOGS_ADMIN_FANOUT=true.
kindquerystringNoOne of: request, response, event.
methodquerystringNoFilter by HTTP method.
sourcequerystringNoOne of: backend, edge.
Terminal window
curl -X GET "https://api.hoody.com/_logs?limit=200&containerId=cnt_def456&level=info,warn&kind=request" \
-H "Authorization: Bearer <token>"
{
"entries": [
{
"id": 12345,
"traceId": "550e8400-e29b-41d4-a716-446655440000",
"tsMs": 1705312200000,
"tsIso": "2024-01-15T12:30:00.000Z",
"kind": "request",
"level": "info",
"projectId": "proj_abc123",
"containerId": "cnt_def456",
"serviceName": "api-gateway",
"method": "GET",
"url": "/v1/users",
"clientIp": "192.168.1.100",
"status": 200,
"data": {},
"source": "edge"
}
],
"total": 1500,
"limit": 200,
"offset": 0
}

GET /_logs/stats

Retrieve aggregate counts for stored logs, broken down by level, project, container, and service.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://api.hoody.com/_logs/stats" \
-H "Authorization: Bearer <token>"
{
"total": 125000,
"byLevel": {
"debug": 45000,
"info": 60000,
"warn": 15000,
"error": 5000
},
"byProject": {
"proj_abc123": 75000,
"proj_def456": 50000
},
"byContainer": {
"cnt_111": 40000,
"cnt_222": 35000,
"cnt_333": 50000
},
"byService": {
"api-gateway": 80000,
"auth-service": 25000,
"db-proxy": 20000
}
}

GET /_logs/stream

Opens a persistent Server-Sent Events connection that streams new log entries as they are recorded by the proxy.

NameInTypeRequiredDescription
projectIdquerystringNoFilter to a single project (admin-port only; SNI clients are auto-scoped).
containerIdquerystringNoFilter to a single container.
kindquerystringNoOne of: request, response, event.
levelquerystringNoOne of: debug, info, warn, error.
Last-Event-IDheaderstringNov8 §6.4 — numeric ringSeq of the last event received. Server skips entries ≤ this value from the ring buffer on reconnect.
Terminal window
curl -X GET "https://api.hoody.com/_logs/stream?containerId=cnt_def456&level=info" \
-H "Authorization: Bearer <token>" \
-H "Last-Event-ID: 12345" \
-H "Accept: text/event-stream"

SSE stream of live log entries. Each frame carries an id: line with the ringSeq and a data: line with a JSON-serialized LogEntry.

id: 12346
data: {"id":12346,"traceId":"550e8400-e29b-41d4-a716-446655440000","tsMs":1705312201000,"tsIso":"2024-01-15T12:30:01.000Z","kind":"event","level":"info","projectId":"proj_abc123","containerId":"cnt_def456","serviceName":"api-gateway","method":"POST","url":"/v1/orders","clientIp":"192.168.1.100","status":201,"data":{},"source":"backend"}
: