Skip to main content
GET
Count Log Entries by Level

Authorizations

X-API-Key
string
header
required

Supply the API Key in the HTTP-Header

Headers

x-cognigy-log-model-version
enum<string>

Must be "v2" — countTypeLogs reads the V2 time-series collection.

Available options:
v1,
v2

Path Parameters

projectId
string
required

The unique identifier for the Project.

Required string length: 24
Pattern: ^[a-z0-9]{24}$

Query Parameters

userId
string

The ID of the user to filter log entries by.

flowName
string

The name of the Flow to filter log entries by.

sessionId
string

The ID of the session to filter log entries by. Matched exactly and case-sensitively; a partial value returns no results.

Maximum string length: 1024
lastTimeWindow
integer

How many hours back the query should read, counted from now. Overrides the cluster's configured tail cutoff for this request only. Omit it to keep the configured cutoff, except on count: when the cutoff feature is off and this parameter is omitted, count substitutes a one-hour safety floor rather than scanning unbounded (tail may still be unbounded because it stops after one page). Every cluster accepts 1, 6 and 12, and each also accepts its own configured cutoff value (for example 24 on a cluster configured with a 24-hour cutoff); any other value is rejected with a 400 that lists the accepted set, which is why no enum is published here. Requires the log entries v2 model. Send it together with the x-cognigy-log-model-version: v2 header, unless the service has the v2 model enabled cluster-wide, in which case the header is not needed; the 400 is returned only when the request would otherwise route to the v1 model.

Required range: x >= 1
Example:

6

Response

Returns the entry count for each log level.

counts
object
required

Exactly one entry for each counted level. trace is deliberately omitted, even though untyped tail responses may contain trace entries.

cap
integer
required

The per-level ceiling applied to this request.

Example:

50000

window
object
required

The time window the counts cover.

Last modified on September 16, 2026