---
title: "Get Dashboard Stats"
method: GET
path: "/api/dashboard/stats"
tags: ["dashboard"]
---

# Get Dashboard Stats

`GET /api/dashboard/stats`

## Request

- Base URL: `https://www.gateco.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://www.gateco.ai/api/dashboard/stats`
- Auth: OAuth 2 (password, token URL `/api/auth/login`)

Aggregate dashboard stats with real data from all milestones.

## Query parameters

- `sparklines` boolean

## Response `200`

Successful Response

- DashboardStats
  - `retrievals_today` integer
  - `retrievals_allowed` integer
  - `retrievals_denied` integer
  - `connectors_connected` integer
  - `connectors_error` integer
  - `idps_connected` integer
  - `idps_principal_count` integer
  - `last_idp_sync` string, nullable
  - `recent_denied` RecentDeniedRetrieval[]
    - `id` string, required
    - `query` string, required
    - `principal_name` string, nullable, required
    - `denial_reason` string, required
    - `timestamp` string, required
  - `total_bound_vectors` integer
  - `total_vectors` integer
  - `overall_coverage_pct` number, nullable
  - `connectors_policy_ready` integer
  - `sparklines` DashboardSparklines: Time-series data for dashboard KPI sparklines. All arrays are zero-filled server-side to exact lengths. - retrievals_24h: 24 hourly buckets ending at the current hour (UTC). Sums allowed + partial + denied outcomes per bucket. - denied_24h: 24 hourly buckets aligned to retrievals_24h; denied outcomes only. - principals_7d: 7 daily buckets ending today; counts principals with status='active' AND last_seen falling within each day's window. - coverage_7d: 7 daily buckets; v1 returns a flat line of the current coverage value (no historical snapshots exist yet). A future migration will add a coverage_snapshots table for true 7-day trend data.
    - `retrievals_24h` integer[], required
    - `denied_24h` integer[], required
    - `principals_7d` integer[], required
    - `coverage_7d` number[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gateco/apis/gateco-api.md) · [All operations](https://skmtc.dev/gateco/apis/gateco-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gateco/apis/gateco-api/revisions/5debaf204950?raw)
