Files
tenant-registry/openapi.yaml
Sharang ParnerkarandClaude Opus 5.5 9138ac586b
ci / shared (pull_request) Successful in 11s
ci / test (pull_request) Successful in 7m32s
ci / image (pull_request) Skipped
feat(usage): add GET /v1/usage/summary aggregate route
The portal's 30-day views folded at most 1000 events from the usage list,
so busy tenants saw figures that were too low. The summary aggregates
every matching event in the store (GROUP BY in Postgres, the same fold in
Memory): counts, quantity sums and the latest occurred_at per product and
metric, and counts and sums per UTC day and metric.

Same filters, tenant pinning for user tokens and route group (usage.read)
as GET /v1/usage/events, so the portal's service client needs no new
AUTHZ grant. Both stores share the filter (usageWhere / matches).

Refs: t80

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:17:47 +01:00

138 KiB