---
title: "Feedback Aggregate"
method: POST
path: "/feedback/aggregate"
tags: ["Feedback"]
---

# Feedback Aggregate

`POST /feedback/aggregate`

Aggregate typed scorer feedback (tags, ratings) over time buckets.

## Request body

- FeedbackAggregateReq — Query for aggregate scores by time bucket and dimension.
  - `project_id` string, required
  - `after_ms` integer, required — Inclusive lower bound on created_at (milliseconds since epoch).
  - `before_ms` integer, required — Exclusive upper bound on created_at (milliseconds since epoch).
  - `time_bucket_seconds` integer, nullable — Time bucket size in seconds, e.g. 3600 for 1h buckets
  - `feedback_types` string[] — Filter on feedback_type by prefix
  - `tags` string[] — Filter to feedback that includes any of the given tags
  - `rating_min` number, nullable — Include only rows with a rating >= this value
  - `rating_max` number, nullable — Include only rows with a rating <= this value
  - `monitor_ids` string[] — Filter to these monitor ids (exact match; suffix with '*' for prefix match).
  - `scorer_ids` string[] — Filter to these scorer ids (exact match; suffix with '*' for prefix match).
  - `span_agent_names` string[] — Filter to feedback whose span_agent_name matches any of these (exact).
  - `span_types` string[] — Filter by span type (turn vs conversation).
  - `group_by` string[] — Allowed: ['scorer_id', 'span_agent_name', 'span_agent_version', 'span_status_code'].

## Response `200`

Successful Response

- FeedbackAggregateRes — Sparse time-series of aggregated scorer feedback (empty buckets omitted).
  - `time_bucket_seconds` integer, nullable — Time bucket size used (seconds). None when unbucketed.
  - `after_ms` integer, required — Resolved inclusive lower bound, unix epoch ms (UTC).
  - `before_ms` integer, required — Resolved exclusive upper bound, unix epoch ms (UTC).
  - `buckets` FeedbackAggregateBucket[]
    - `time_bucket_start_ms` integer, nullable — Time bucket start, unix epoch ms (UTC). None when unbucketed.
    - `group` object — Group-by dimension values for this row (e.g. {'scorer_id': '...'}).
    - `total_count` integer, required — Number of feedback rows in this bucket/group.
    - `scored_count` integer, required — Rows that emitted a score (at least one tag or rating). Excludes agent-monitor rows that scored nothing — use this for score volume.
    - `tag_counts` object — Count of each scorer tag.
    - `rating_counts` object — Number of rows carrying each rating key (e.g. '_rating_').
    - `rating_sums` object — Sum of each rating key's values; client derives avg = sum/count.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/wandb/apis/serverless-training.md) · [All operations](https://skmtc.net/wandb/apis/serverless-training/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wandb/serverless-training/revisions/8d8d96fc0fd3/schema)
