Skip to content

Add REST Route: Get Current User Usage and Stats #29

@greatest0fallt1me

Description

@greatest0fallt1me

Description
Implement GET /api/usage (authenticated): query params (from, to, limit). Return usage events for the current user (from JWT), total spent in period, and optional breakdown by API. Use usage_events repository and requireAuth.

Requirements and context

  • Must require wallet auth (JWT)
  • Default period: current month or last 30 days

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/rest-user-usage
  • Implement changes
    • Route GET /api/usage with requireAuth; validate query; return events and aggregates
    • Add tests
  • Test and commit
    • Run tests
    • Example commit message: feat: REST user usage and stats

Guidelines

  • Clear documentation
  • Timeframe: 96 hours
  • Project details: #

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions