query_usage
Query time-bucketed usage telemetry this account's own backend has pushed or synced in (e.g. API request counts, tokens processed) — the raw data unit-economics metrics divide cost by (see list_unit_metrics/query_unit_costs), inspected directly rather than through a pre-defined ratio. quantity is a raw count with no currency — never treat it as money. Optionally broken down by external_customer_id when the pushed rows carry one. Mirrors GET /api/usage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | ISO-8601 end of the date range (exclusive) | |
| group_by | No | Time bucket size (default: day). "hour" is only supported for ranges of 7 days or less. | |
| start_date | No | ISO-8601 start of the date range (inclusive) | |
| breakdown_by | No | ||
| filter_metric | No | Restrict to these metric names | |
| filter_source_id | No | Restrict to usage pushed/synced under these usage-source ids | |
| filter_external_customer_id | No |