Skip to main content
POST
Query CloudWatch Logs Insights histogram

Body

application/json

Request body for the full-window histogram. Same scope + window + filter as the row query; no paging or row limit (the aggregation counts the whole window).

endTime
string
required

Inclusive end of the query window (ISO 8601)

startTime
string
required

Inclusive start of the query window (ISO 8601)

environmentId
string | null

Environment whose module-instance ui.logs sources are queried. Optional when moduleInstanceIds/logSourceKeys name the sources.

filter
object

Structured filter applied to the matched sources, the same as the row query. The returned histogram reflects the filtered volume.

logSourceKeys
string[] | null

Restrict to these individual ui.logs sources by composite <moduleInstanceId>::<logSourceId> key.

moduleInstanceIds
string[] | null

Restrict to these module instance ids (see the row request for semantics).

periodSeconds
integer<int32> | null

Bucket period in seconds. Omit to choose one automatically from the time window. Clamped to 1–86400.

Response

The request has succeeded.

Response payload for the full-window per-level histogram (a separate endpoint from rows so it can be cached longer and so rows render without waiting for the aggregation).

histogram
object[]
required

Contiguous per-level histogram buckets across the FULL query window. Computed by a count aggregation, so the counts reflect every matching event in the window and are never truncated by the row limit.

missedSources
string[]
required

Log groups of the sources whose aggregation could not be queried (empty unless partial is true).

partial
boolean
required

True when one or more sources' aggregation could not be queried, so those sources are omitted from the bar counts. Listed in missedSources.

periodSeconds
integer<int32>
required

The histogram bucket period in seconds