Overview
Retrieve usage details for a specific API key, including optional daily series when a date range is provided.GET /api/v1/api-keys//usage
Purpose: return usage data for a single API key. Path parameter:id(UUID)
from(RFC3339 timestamp, optional): include daily usage from this timestamp (used for time series). Defaults to keycreated_atwhen onlytois provided.to(RFC3339 timestamp, optional): include daily usage up to this timestamp (used for time series). Defaults to now when onlyfromis provided.
- Series data is included when either
fromortois provided. - If
tois missing, it defaults to now; iffromis missing, it defaults to the API keycreated_at. The computed bounds are normalized vianormalizeToUTCDate. - Daily buckets come from
buildDailySeriesDates, and the series is generated viac.buildAPIKeyUsageSeriesusing the computed start/end.
Response
Status:200 OK
Example response:
400invalid UUID.401unauthorized.404key not found.500internal error.