Skip to main content

get-gateway-requests

Query gateway request analytics with the Unkey CLI
1 min read

Run SQL queries against requests that Unkey routed to your deployments. Queries use the gateway_requests_v1 table and are restricted to the authenticated workspace.

Usage#

Flags#

--querystringrequired#

SQL query to execute against gateway_requests_v1. Add a filter on project_id, app_id, or environment_id to restrict the results.

Global flags#

FlagTypeDescription
--root-keystringOverride root key ($UNKEY_ROOT_KEY)
--api-urlstringOverride API base URL (default: https://api.unkey.com)
--configstringPath to config file (default: ~/.unkey/config.toml)
--outputstringOutput format. Use json for raw JSON
--bodystringSend this JSON string as the request body. You cannot combine it with request-building flags.

Examples#

See Query gateway request analytics for the table schema, query restrictions, and more examples.