---
title: "Get total count for raw logs query"
method: POST
path: "/dashboard/api/raw-logs/count"
tags: ["Dashboard"]
---

# Get total count for raw logs query

`POST /dashboard/api/raw-logs/count`

## Request

- Base URL: `https://api.agnost.ai`
- URL: `https://api.agnost.ai/dashboard/api/raw-logs/count`
- Auth: one of:
  - HTTP bearer and API key in header `x-org-id`
  - API key in header `x-api-key`

Returns the total event count matching the MV-compatible subset of
`/raw-logs` filters, served from the `event_daily_stats` materialized
view for sub-second latency. Exact `event_id` and `conversation_id`
filters are not supported. The frontend issues this in parallel with
`/raw-logs` so the page renders immediately and the total fills in
when ready.

Returns `{"total_count": null}` when the filter set cannot be answered
by the materialized view (search query, client_config, connection_type,
or arbitrary metadata keys other than event_type).

## Request body

- QueryFilters
  - `time_range` '1min' | '1h' | '1d' | '1w' | '1m' | 'all'
  - `connection_type` union
    - string
    - string[]
  - `agent_name` union
    - string
    - string[]
  - `metadata_filters` object[]
    - `key` string
    - `value` string
  - `page` integer
  - `page_size` integer

## Response `200`

Total count, or null if filters are MV-incompatible

- object
  - `total_count` integer, nullable

## Changes

- **2026-11-03** `a61431b48f36`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agnost/apis/agnost-ai-api/changes/dashboard/api/raw-logs/count/post.md)

---

[API](https://skmtc.dev/agnost/apis/agnost-ai-api.md) - [All operations](https://skmtc.dev/agnost/apis/agnost-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agnost/apis/agnost-ai-api/revisions/a61431b48f36?raw)
