Skip to content
Navigation

Tail an index

Streams events as Server-Sent Events, in ingestion order. Without Last-Event-ID the stream starts after the newest committed event; with it, retained events after that ID are replayed first.

log frames carry one event. A cursor frame means the stream has caught up. gap and error frames end the stream; after a gap, search the retained history before you reconnect.

Frame IDs are opaque resume tokens bound to the route and filters. They aren't interchangeable with next_cursor values or event ids.

GET
/indexes/{index}/logs/tail

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • index
    string
    required

    Index name: lowercase letters, digits, underscores and hyphens. The token's index scope applies as well as its source scope.

    maxLength: 63 · minLength: 1 · pattern: ^[a-z0-9][a-z0-9_-]*$

Query parameters

  • source
    optional
    string

    Comma-separated read-scoped sources

  • service
    optional
    string

    Exact service

  • logger
    optional
    string

    Exact logger

  • host
    optional
    string

    Exact host

  • message
    optional
    string

    Literal message substring

  • min_level
    optional
    integer

    Minimum numeric severity

  • filter
    optional
    unknown

    URL-encoded JSON, at most 4096 bytes decoded. Exact, typed matches on top-level attributes; every condition must match, along with the other filters. Missing and null values never match. Duplicate or unknown members and conflicting conditions return 400. The request path and query together are limited to 32768 bytes.

Header parameters

  • Last-Event-ID
    optional
    string

    ID of the last frame you processed, at most 1024 bytes. Send it on the same route with the same filters; anything else returns 400. An event's JSON id is not a resume ID.

    maxLength: 1024 · pattern: ^[a-z0-9][a-z0-9_-]*:v1\.[A-Za-z0-9_-]+$

Returns

200

SSE log, cursor, gap, error frames

400

Invalid resume cursor

401

Invalid read credential

403

Source outside scope

404

Index not found
JSON
  • error
    string
    required

413

A retained event exceeds the subscriber output byte budget before streaming starts

429

Subscriber capacity exhausted; Retry-After: 1

503

Storage unavailable

Type to search…

↑↓ navigate↵ selectEsc close