Skip to main content
POST
Search log lines
For the query language and how to find your source IDs, see Querying logs.

Authorizations

Authorization
string
header
required

Authorization: Bearer <token>

Body

application/json

Filters and pagination for searching log lines.

site_id
string
required

Site to search; an empty value returns no log lines.

source_ids
string[]
required

Log sources to search; an empty list returns no log lines.

query
string
required

Log search query; an empty string matches every line.

pagination
object
required

Page size, order and cursor.

from
string<date-time> | null

Start of the time range; defaults to the start of the account's log retention and is clamped to it and now.

to
string<date-time> | null

End of the time range; defaults to now and is clamped to from..now.

Response

The matching log lines, or a server-sent event stream whose data fields are each a LogStreamEvent.

timestamp
string<date-time>
required

When the line was logged, with millisecond precision.

id
string | null

Unique ID of the line.

source_id
string | null

Log source the line was ingested through.

group
string | null

Group the line belongs to, such as the app or service name.

severity
string | null

Severity level, such as info or error.

message
string | null

The log message.

hostname
string | null

Host that emitted the line.

json
string | null

The line's attributes as a JSON-encoded string.