---
title: "The full metric bundle for a site and window"
method: GET
path: "/api/stats"
tags: ["analytics"]
---

# The full metric bundle for a site and window

`GET /api/stats`

## Request

- Base URL: `https://app.vitrus.dev/app`
- URL: `https://app.vitrus.dev/app/api/stats`
- Auth: one of:
  - API key in cookie `vitrus_session`
  - HTTP bearer

## Query parameters

- `site` string, required
- `days` integer

## Response `200`

Every metric, each with the query behind it.

- object
  - `siteId` string
  - `window` object
  - `evidence` object[]
    - `id` string, required
    - `metric` string, required
    - `label` string
    - `value` number, nullable
    - `previous` number, nullable
    - `deltaPct` number, nullable
    - `unit` 'count' | 'percent' | 'seconds' | 'ratio'
    - `sql` string, required
    - `params` unknown[], required
      - unknown
    - `window` object, required
      - `from` integer
      - `to` integer
      - `label` string
    - `rows` object[], nullable

## Other responses

- `404`: No such site, or not yours — the two are indistinguishable by design.

---

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