Run SQL queries against your rate limit analytics. Queries can use the raw
ratelimits_v1 table or the per-minute, per-hour, per-day, and per-month
aggregate tables.
Unkey restricts every query to the authenticated workspace. Workspace retention and query limits apply.
Usage#
Flags#
SQL query to execute against your rate limit analytics data. The query can
reference ratelimits_v1, ratelimits_per_minute_v1,
ratelimits_per_hour_v1, ratelimits_per_day_v1, or
ratelimits_per_month_v1.
Global flags#
| Flag | Type | Description |
|---|---|---|
--root-key | string | Override root key ($UNKEY_ROOT_KEY) |
--api-url | string | Override API base URL (default: https://api.unkey.com) |
--config | string | Path to config file (default: ~/.unkey/config.toml) |
--output | string | Output format. Use json for raw JSON |
--body | string | Send this JSON string as the request body. You cannot combine it with request-building flags. |
Examples#
See Query rate limit analytics for table schemas, query restrictions, and more examples.