---
title: "Feedback Stats"
method: POST
path: "/feedback/stats"
tags: ["Feedback"]
---

# Feedback Stats

`POST /feedback/stats`

## Request

- Base URL: `https://trace.wandb.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://trace.wandb.ai/feedback/stats`
- Auth: none declared

Return aggregated feedback statistics over time buckets.

## Request body

- FeedbackStatsReq: Request for aggregated feedback statistics over time buckets.
  - `project_id` string, required
  - `start` string, date-time, required: Inclusive start time (UTC, ISO 8601).
  - `end` string, date-time, nullable: Exclusive end time (UTC, ISO 8601). Defaults to now if omitted.
  - `feedback_type` string, nullable: Filter by feedback_type.
  - `trigger_ref` string, nullable: Filter by trigger_ref (exact or prefix match for all-versions).
  - `granularity` integer, nullable: Bucket size in seconds. If omitted, auto-selected based on time range.
  - `timezone` string: IANA timezone for bucket alignment.
  - `metrics` FeedbackMetricSpec[]: Metrics to aggregate from payload_dump.
    - `json_path` string, required: Dot path into payload_dump (e.g. 'output', 'output.score').
    - `value_type` 'numeric' | 'boolean' | 'categorical': Type of value at path. numeric: avg/min/max; boolean: count_true/count_false.
    - `aggregations` AggregationType[]: Aggregation functions to compute. If empty, defaults are chosen based on value_type: numeric->avg/min/max, boolean->count_true/count_false.
    - `percentiles` number[]: Percentile values to compute (0–100), e.g. [5, 50, 95]. Only applicable for numeric value_type fields; ignored for boolean/categorical.

## Response `200`

Successful Response

- FeedbackStatsRes: Response with time-series feedback statistics.
  - `start` string, date-time, required: Resolved start time (always UTC, regardless of the requested timezone).
  - `end` string, date-time, required: Resolved end time (always UTC, regardless of the requested timezone).
  - `granularity` integer, required: Bucket size used (in seconds)
  - `timezone` string, required: Timezone used for bucket alignment
  - `buckets` object[]: Time-bucketed aggregations. Each dict has 'timestamp' (ISO string), 'count' (int), and '{agg}_{slug}' keys for each requested metric+aggregation.
  - `window_stats` object, nullable: Aggregations over the full query window, keyed by metric slug (e.g. 'output_score'). Each value maps agg name to result.

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `dd89fadfe4e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/wandb/apis/fastapi/changes/feedback/stats/post.md)

---

[API](https://skmtc.dev/wandb/apis/fastapi.md) - [All operations](https://skmtc.dev/wandb/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/wandb/apis/fastapi/revisions/f7643c49bf2e?raw)
