v2

latestOpenAPI 3.0.02026-08-073221853.1 MB
Logs

List recent events for the Logs Explorer

get/console/v1/logs

Query parameters

querystring
Example:service:console AND @status:error

Logs Explorer filter syntax (same as the console filter bar), e.g. service:console AND @status:error or event_name:add_to_cart. Do not start the filter with #; use the source param to choose logs, events, or spans.

source'logs' | 'events' | 'spans'
Example:logs

Data source for query. Default: logs. Use events for custom events or spans for traces.

columnsstring
Example:timestamp,user.service,metadata.body,value

Comma-separated Logs Explorer column ids to include in each row's fields map (e.g. timestamp, user.service, metadata.body, custom_id:my_id_type, rule).

start_tsinteger
Example:1736208000000

Start of the time window, in milliseconds since epoch. Defaults to one hour before end_ts when omitted.

end_tsinteger
Example:1736294400000

End of the time window, in milliseconds since epoch. Defaults to the current time when omitted.

limitinteger
Example:100

Maximum number of events to return. Default: 100. Max: 1000.

afterstring

Opaque cursor from pagination.next_cursor in a previous response. Pass it back verbatim as after to fetch the next page. Cursors deeper than 100000 rows are rejected with a 400; narrow the time window with start_ts/end_ts instead of paginating deeper.

Response

Paginated event feed

messagestring required

A simple string explaining the result of the operation.

columnsstring[]

Echoes the column ids requested via the columns query param, in order.

Example response

{
  "message": "Logs listed successfully.",
  "data": [
    {
      "id": "1736208000000||abc123||add_to_cart",
      "timestamp": "2025-01-06T16:00:00.000Z",
      "event_name": "add_to_cart",
      "user_id": "user_1",
      "value": "1",
      "sdk_type": "js-client",
      "sdk_version": "4.0.0"
    },
    {
      "id": "1736207999000||def456||add_to_cart",
      "timestamp": "2025-01-06T15:59:59.000Z",
      "event_name": "add_to_cart",
      "user_id": "user_2",
      "value": null,
      "sdk_type": "js-client",
      "sdk_version": "4.0.0"
    }
  ],
  "pagination": {
    "next_cursor": "eyJpbmRleCI6Mn0",
    "has_more": true
  }
}