Skip to main content
POST
/
feedback
/
aggregate
Feedback Aggregate
curl --request POST \
  --url https://api.example.com/feedback/aggregate \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "<string>",
  "after_ms": 1,
  "before_ms": 1,
  "time_bucket_seconds": 1,
  "feedback_types": [
    "<string>"
  ],
  "tags": [
    "<string>"
  ],
  "rating_min": 0.5,
  "rating_max": 0.5,
  "monitor_ids": [
    "<string>"
  ],
  "scorer_ids": [
    "<string>"
  ],
  "span_agent_names": [
    "<string>"
  ],
  "span_types": [],
  "group_by": []
}
'
{
  "after_ms": 123,
  "before_ms": 123,
  "time_bucket_seconds": 123,
  "buckets": [
    {
      "total_count": 123,
      "scored_count": 123,
      "time_bucket_start_ms": 123,
      "group": {},
      "tag_counts": {},
      "rating_counts": {},
      "rating_sums": {}
    }
  ]
}

Body

application/json

Query for aggregate scores by time bucket and dimension.

project_id
string
required
Example:

"entity/project"

after_ms
integer
required

Inclusive lower bound on created_at (milliseconds since epoch).

Required range: x >= 0
before_ms
integer
required

Exclusive upper bound on created_at (milliseconds since epoch).

Required range: x >= 0
time_bucket_seconds
integer | null

Time bucket size in seconds, e.g. 3600 for 1h buckets

Required range: x > 0
feedback_types
string[]

Filter on feedback_type by prefix

tags
string[]

Filter to feedback that includes any of the given tags

rating_min
number | null

Include only rows with a rating >= this value

Required range: 0 <= x <= 1
rating_max
number | null

Include only rows with a rating <= this value

Required range: 0 <= x <= 1
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
enum<string>[]

Filter by span type (turn vs conversation).

Available options:
agent_turn,
agent_conversation
group_by
enum<string>[]

Allowed: ['scorer_id', 'span_agent_name', 'span_agent_version', 'span_status_code'].

Available options:
scorer_id,
span_agent_name,
span_agent_version,
span_status_code

Response

Successful Response

Sparse time-series of aggregated scorer feedback (empty buckets omitted).

after_ms
integer
required

Resolved inclusive lower bound, unix epoch ms (UTC).

before_ms
integer
required

Resolved exclusive upper bound, unix epoch ms (UTC).

time_bucket_seconds
integer | null

Time bucket size used (seconds). None when unbucketed.

buckets
FeedbackAggregateBucket · object[]