Get widget chart data
Returns chart data for one or more widget types in the requested time range.
Workflow
GET /widgets— list valid widget slugs (data[].id).POST /applications/{applicationId}/widget-data— pass those slugs as bodytypes(array of strings), plusstartandend(ISO 8601 UTC, inclusive;endmust be on or afterstart).
Request body
| Field | Required | When to use |
|---|---|---|
types | yes | Widget slugs from GET /widgets data[].id (e.g. sessions-evaluated, guardrail-latency) |
start, end | yes | Time range for the charts |
Response
data— array of widget results in the same order astypes. Each item includes:id— requested widget slugdata— chart payload when successful; shape depends on the widget (see response examples)meta.source— category label for the widget data (see response examples)meta.type— resolved widget type (e.g.token-usagemay map totokens-analysis)message/code— present when that widget could not be loaded (unknown_type,unsupported,upstream)
Time-bucketed series are zero-filled between start and end. Bucket granularity (hour / day / week / month) is chosen from the range length.
Authorizations
Your Trusys API key. Create and manage keys in the Trusys UI under Settings → API Keys.
Include the key on every request:
x-api-key: <your-api-key>Path Parameters
Unique identifier (UUID) of the application. Returned by POST /applications.
Body
Widget types and time range (types, start, end).
Board widget type slugs from GET /widgets data[].id. Results are returned in the same order.
11["sessions-evaluated", "guardrail-latency"]Start of the time range, inclusive (ISO 8601 UTC).
"2026-01-01T00:00:00.000Z"
End of the time range, inclusive (ISO 8601 UTC). Must be on or after start.
"2026-01-31T23:59:59.000Z"