KapsoEx.Platform.LogSearch (kapso_ex v0.1.0)

Copy Markdown View Source

Search the same log events shown in the Kapso logs UI: API logs, WhatsApp webhook events, flow events and webhook deliveries.

Summary

Functions

Returns the log sources, supported filter keys and detail fields.

Searches log events.

Searches log events with structured filters, plus the params of search/2 in the body. See catalog/1 for the supported filter keys.

Types

result()

@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}

Functions

catalog(client)

@spec catalog(KapsoEx.Client.t()) :: result()

Returns the log sources, supported filter keys and detail fields.

search(client, params \\ [])

@spec search(KapsoEx.Client.t(), map() | keyword()) :: result()

Searches log events.

Params: query, period ("24h", "7d", "context"), source, problems_only, errors_only, limit, cursor, around, highlight_event_id, highlight_resource_id.

search_with_filters(client, attrs)

@spec search_with_filters(KapsoEx.Client.t(), map() | keyword()) :: result()

Searches log events with structured filters, plus the params of search/2 in the body. See catalog/1 for the supported filter keys.