---
title: "Batched event durations for several event types and teams in one request"
method: GET
path: "/v4/admin/statistics"
tags: ["v4", "Admin"]
---

# Batched event durations for several event types and teams in one request

`GET /v4/admin/statistics`

## Query parameters

- `types` EventType[], required
- `teamIds` string[], required
- `bucketMinutes` integer
- `windowHours` integer

## Response `200`

Success

- SuccessResponseAdminEventDurationStatsBatchResponse
  - `success` true, required — Flag for it request was successful
  - `data` AdminEventDurationStatsBatchResponse, required
    - `bucketMinutes` integer, required — Width of each time bucket, in minutes
    - `windowHours` integer, required — Length of the reporting window, in hours
    - `stats` TeamEventDurationStatsGroup[], required — One group per requested event type, each holding the per-team buckets for the requested teams
      - `eventType` string, required — Event type these per-team stats belong to
      - `teams` TeamEventDurationStats[], required — Per-team duration buckets for this event type; only requested teams with matching events appear
        - `teamId` union, required — Team the buckets belong to
          - string, uuid
          - string
        - `teamDomain` string, nullable — Team domain, when available
        - `buckets` EventDurationBucket[], required — Time buckets ordered ascending by bucket start, spanning the full window
          - `bucketStart` string, date-time, required — Start of the fixed-width time bucket (UTC)
          - `avgDurationSec` number, required — Average event duration within the bucket, in seconds (0 when no events)
          - `minDurationSec` number, required — Minimum event duration within the bucket, in seconds (0 when no events)
          - `maxDurationSec` number, required — Maximum event duration within the bucket, in seconds (0 when no events)
          - `avgMemoryBytes` number, required — Average DuckDB memory used within the bucket, in bytes (0 when not reported)
          - `minMemoryBytes` number, required — Minimum DuckDB memory used within the bucket, in bytes (0 when not reported)
          - `maxMemoryBytes` number, required — Maximum DuckDB memory used within the bucket, in bytes (0 when not reported)
          - `requestCount` integer, required — Number of events recorded within the bucket
  - `meta` ResponseMeta
    - `requestId` string — Unique request identifier for tracing
    - `timestamp` string, date-time — Response timestamp (UTC)
    - `durationMs` integer, nullable — Request processing time in milliseconds

## Other responses

- `401` — Auth Invalid Token
- `403` — Forbidden Insufficient Permissions
- `422` — Validation Failed
- `426` — Business Quota Exceeded
- `500` — Internal Error

---

[API](https://skmtc.dev/definite/apis/defapi.md) · [All operations](https://skmtc.dev/definite/apis/defapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/definite/defapi/revisions/3943d8deb3be/schema)
