---
title: "Get Policy Stats Route"
method: GET
path: "/api/v1/policies/{policy_id}/stats"
tags: ["policies"]
---

# Get Policy Stats Route

`GET /api/v1/policies/{policy_id}/stats`

## Request

- Base URL: `https://cp.xenovia.io` (the document declares no server; this is the origin it was published from)
- URL: `https://cp.xenovia.io/api/v1/policies/{policy_id}/stats`
- Auth: none declared
- TypeScript: <https://skmtc.dev/xenovia/apis/controlplane/docs/api/v1/policies/:policy_id/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

What the policy decided over ``days``, from the evaluation ledger.

## Path parameters

- `policy_id` string, uuid, required

## Query parameters

- `days` integer

## Headers

- `Authorization` string, nullable

## Response `200`

Successful Response

- PolicyStatsRead: GET /policies/{id}/stats: what the policy decided over ``days``, from the evaluation ledger. ``available`` is false, and the rest empty, when the telemetry store is not configured or fails. The caller zero-fills ``by_day``.
  - `available` boolean
  - `days` integer, required
  - `totals` object
  - `by_day` object[]
  - `by_agent` object[]
  - `recent` object[]
  - `latency_ms` object
  - `last_decision_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-06** `19f8b5adbd7f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/policies/:policy_id/stats/get.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) - [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) - [OpenAPI document](https://skmtc.dev/xenovia/apis/controlplane/revisions/19f8b5adbd7f?raw)
