Unbind
Logs

Stream Logs

Stream live logs over Server-Sent Events. Errors are delivered as `message` events with an error type, not HTTP status codes.

GET
/logs/stream

Stream live logs over Server-Sent Events. Errors are delivered as message events with an error type, not HTTP status codes.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token or API key (unb_...) passed as Authorization: Bearer <token>.

In: header

Query Parameters

type*LogType

Value in

  • "team"
  • "project"
  • "environment"
  • "service"
  • "deployment"
  • "build"
team_id*string
project_id?string
environment_id?string
service_id?string
deployment_id?string
start?string
Formatdate-time
since?string

Duration to look back (e.g., '1h', '30m')

Default"10m"
limit?integer

Number of lines to get from the end (mirrors loki.MaxQueryLimit)

Formatint64
Range1 <= value <= 2000
Default2000
search?string

Search expression: bare words (case-insensitive), "quoted phrases", AND/OR, -negation, @key:value for JSON fields

levels?string

Comma-separated log levels to include (debug, info, warning, error)

service_ids?string

Comma-separated service IDs to include (team/project/environment scope only)

Header Parameters

Last-Event-Id?string

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  }]