Stream Logs
Stream live logs over Server-Sent Events. Errors are delivered as `message` events with an error type, not HTTP status codes.
Stream live logs over Server-Sent Events. Errors are delivered as message events with an error type, not HTTP status codes.
Authorization
bearerAuth Access token or API key (unb_...) passed as Authorization: Bearer <token>.
In: header
Query Parameters
Value in
- "team"
- "project"
- "environment"
- "service"
- "deployment"
- "build"
date-timeDuration to look back (e.g., '1h', '30m')
"10m"Number of lines to get from the end (mirrors loki.MaxQueryLimit)
int641 <= value <= 20002000Search expression: bare words (case-insensitive), "quoted phrases", AND/OR, -negation, @key:value for JSON fields
Comma-separated log levels to include (debug, info, warning, error)
Comma-separated service IDs to include (team/project/environment scope only)
Header Parameters
Resume cursor (nanosecond timestamp); set automatically by the SSE client on reconnect
Response Body
text/event-stream
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/logs/stream?type=team&team_id=string"[ { "data": { "error_message": "string", "logs": [ { "level": "debug", "message": "string", "metadata": { "deployment_id": "string", "environment_id": "string", "project_id": "string", "service_id": "string", "team_id": "string" }, "pod_name": "string", "timestamp": "2019-08-24T14:15:22Z" } ], "type": "log" }, "event": "message", "id": 0, "retry": 0 }]Query Logs GET
Query historical logs for a team, project, environment, service, or deployment. Send the ID of the level named by type along with the IDs of every level above it. The deployment and build types need service_id and deployment_id.
Get Metrics GET
Get CPU, memory, network, and disk metrics for a team, project, environment, or service.