Count Log Entries by Level
Counts log entries in a Project per log level (fatal, error, warn, info, debug — trace is not counted), using the same userId, flowName and sessionId filters as the tail endpoint, so a count can be rendered alongside a filtered tail without the two disagreeing. Note that on this endpoint all three are matched exactly.
Counting is deliberately bounded. Each level is counted up to a server-side ceiling, returned as cap; a level whose true total exceeds it comes back with capped: true and count equal to cap, meaning “at least this many” rather than an exact total. This keeps the endpoint predictable on Projects holding tens of millions of entries.
Requires the log entries v2 model, so the x-cognigy-log-model-version: v2 header is mandatory unless the service has the v2 model enabled cluster-wide. Requests on the v1 model are rejected with a 400 rather than served a different-shaped count.
Authorizations
Supply the API Key in the HTTP-Header
Headers
Must be "v2" — countTypeLogs reads the V2 time-series collection.
v1, v2 Path Parameters
The unique identifier for the Project.
24^[a-z0-9]{24}$Query Parameters
The ID of the user to filter log entries by.
The name of the Flow to filter log entries by.
The ID of the session to filter log entries by. Matched exactly and case-sensitively; a partial value returns no results.
1024How 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.
x >= 16
Response
Returns the entry count for each log level.