Skip to content

feat: reporting-api group_by description#40

Open
mkleina wants to merge 1 commit intomainfrom
reporting-api-group-by
Open

feat: reporting-api group_by description#40
mkleina wants to merge 1 commit intomainfrom
reporting-api-group-by

Conversation

@mkleina
Copy link
Copy Markdown
Contributor

@mkleina mkleina commented Apr 30, 2026

Description

Document the new group_by query parameter for the Proxy Reporting API GET /v1/usage endpoint. When set to subaccount, the response includes usage broken down by sub-account with an additional username field in each record.

Changes

  • feature: Add group_by query parameter definition to the OpenAPI spec
  • feature: Add username field to the UsageRecord schema (present only when group_by=subaccount)
  • feature: Add named response examples ("Default usage" and "Grouped by sub-account") for clearer API documentation

Related changes

  • Backend implementation: massivebackend handler at lambdas/proxy/reporting/internal/api/handler.go (already merged)

How Has This Been Tested?

Ran mintlify dev locally and verified:

  • The group_by parameter renders correctly as a string field with description
  • The response examples panel shows both "Default usage" (without username) and "Grouped by sub-account" (with username) as selectable options
  • No OpenAPI validation errors related to the reporting spec

@giannimassive giannimassive requested review from giannimassive and removed request for giannimassive May 1, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants