Skip to main content
POST
/
feedback
/
stats
Feedback Stats
curl --request POST \
  --url https://api.example.com/feedback/stats \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "<string>",
  "start": "2023-11-07T05:31:56Z",
  "end": "2023-11-07T05:31:56Z",
  "feedback_type": "<string>",
  "trigger_ref": "<string>",
  "granularity": 123,
  "timezone": "UTC",
  "metrics": [
    {
      "json_path": "<string>",
      "value_type": "numeric",
      "aggregations": [],
      "percentiles": [
        123
      ]
    }
  ]
}
'
{
  "start": "2023-11-07T05:31:56Z",
  "end": "2023-11-07T05:31:56Z",
  "granularity": 123,
  "timezone": "<string>",
  "buckets": [
    {}
  ],
  "window_stats": {}
}

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-docs-2661.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

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> | null

Exclusive end time (UTC, ISO 8601). Defaults to now if omitted.

feedback_type
string | null

Filter by feedback_type.

trigger_ref
string | null

Filter by trigger_ref (exact or prefix match for all-versions).

granularity
integer | null

Bucket size in seconds. If omitted, auto-selected based on time range.

timezone
string
default:UTC

IANA timezone for bucket alignment.

metrics
FeedbackMetricSpec ยท object[]

Metrics to aggregate from payload_dump.

Response

Successful Response

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
Buckets ยท object[]

Time-bucketed aggregations. Each dict has 'timestamp' (ISO string), 'count' (int), and '{agg}_{slug}' keys for each requested metric+aggregation.

window_stats
Window Stats ยท object

Aggregations over the full query window, keyed by metric slug (e.g. 'output_score'). Each value maps agg name to result.