---
title: "Return usage analytics grouped into time buckets"
method: GET
path: "/api/trpc/usageAnalytics.getTimeseries"
tags: ["Usage Analytics"]
---

# Return usage analytics grouped into time buckets

`GET /api/trpc/usageAnalytics.getTimeseries`

Returns usage analytics grouped into time buckets. Use this for trend charts and optional split-by series views.

## Response `200`

Successful tRPC response

- object
  - `result` object, required
    - `data` object, required
      - `timeseries` object[], required
        - `datetime` string, required
        - `value` number, required
        - `label` string
      - `effectiveGranularity` 'hour' | 'day' | 'week' | 'month', required

## Other responses

- `400` — Invalid request
- `401` — Authentication required
- `403` — Access denied
- `500` — Unexpected server error

---

[API](https://skmtc.dev/kilo/apis/kilo-code-api.md) · [All operations](https://skmtc.dev/kilo/apis/kilo-code-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kilo/kilo-code-api/revisions/f0b9556c39ea/schema)
