---
title: "Flexible stat query"
method: GET
path: "/stats"
---

# Flexible stat query

`GET /stats`

## Request

- Base URL: `https://api.reps-log.com/v1`
- URL: `https://api.reps-log.com/v1/stats`
- Auth: HTTP bearer

Totals over the precomputed stat tree with year / month / all-time grain and optional groupBy.

## Query parameters

- `year` integer
- `month` integer
- `allTime` boolean
- `groupBy` 'none' | 'property' | 'category' | 'participant' | 'month'
- `propertyId` string
- `participantId` string
- `propertyType` 'str' | 'ltr'

## Response `200`

OK

- object
  - `ok` true, required
  - `data` object, required
    - `scope` object
      - `grain` 'year' | 'month' | 'all_time'
      - `year` number
      - `month` number
      - `groupBy` 'none' | 'property' | 'category' | 'participant' | 'month'
      - `propertyId` string
      - `participantId` string
      - `propertyType` 'str' | 'ltr'
    - `totalHours` number
    - `ltrHours` number
    - `strHours` number
    - `entryCount` number
    - `groups` object[]

## Other responses

- `400`: Validation / bad request
- `401`: Unauthenticated
- `403`: Forbidden scope / not Premium
- `404`: Not found
- `429`: Rate limited

---

[API](https://skmtc.dev/reps-log/apis/repslog-api.md) · [All operations](https://skmtc.dev/reps-log/apis/repslog-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reps-log/apis/repslog-api/revisions/304ab3847932?raw)
