Skip to content

feat: REST revoke API key #32#106

Merged
greatest0fallt1me merged 18 commits intoCalloraOrg:mainfrom
Demilade01:feature/rest-revoke-api-key
Feb 28, 2026
Merged

feat: REST revoke API key #32#106
greatest0fallt1me merged 18 commits intoCalloraOrg:mainfrom
Demilade01:feature/rest-revoke-api-key

Conversation

@Demilade01
Copy link
Contributor

  • Added functionality to revoke an API key for a specified user
  • Implemented endpoint requiring authentication
  • Added unit tests to ensure users can only revoke their own keys and the endpoint is idempotent
    Closes Add REST Route: Revoke API Key #32

Demilade01 and others added 18 commits February 25, 2026 11:19
Implemented a batch payout service to aggregate developer revenue from API
usage and settle payments via Soroban.
Closes CalloraOrg#26
Add GET /api/developers/revenue (authenticated) returning total revenue,
pending settlement, and paginated list of settlements.

- Add requireAuth middleware with Bearer token validation
- Add Settlement, RevenueSummary, DeveloperRevenueResponse types
- Add in-memory mock data layer for settlements and usage
- Add developer routes module mounted at /api/developers
- Add 8 tests covering auth, response shape, values, and pagination

closes CalloraOrg#37
- Add /v1/call/:apiSlugOrId/* proxy route with full middleware pipeline
- Resolve APIs by slug or ID via ApiRegistry
- Auth (x-api-key), rate-limit (429), billing (402) checks
- Forward safe headers, strip internal ones (x-api-key, host, etc.)
- Inject X-Request-Id (UUID) on every request/response
- Configurable timeout (PROXY_TIMEOUT_MS env, default 30s) → 504
- Stream upstream response back to caller
- Record usage events for all proxied requests
- Integration tests covering all error paths and header behavior
This commit implements usage metering for proxied API calls. The billing
and recording logic has been moved to a non-blocking post-response flow
to avoid added latency, and is now based on individual endpoint pricing. Closes CalloraOrg#21
Implemented a batch payout service to aggregate developer revenue from API
usage and settle payments via Soroban.
Closes CalloraOrg#26
- Implemented GET /api/vault/balance route
- Created VaultController to fetch and format balance from stroops
- Integrated requireAuth middleware for endpoint protection
- Added unit tests for VaultController covering various test cases
Closes CalloraOrg#30
- Added functionality to revoke an API key for a specified user
- Implemented  endpoint requiring authentication
- Added unit tests to ensure users can only revoke their own keys and the endpoint is idempotent
Closes CalloraOrg#32
@greatest0fallt1me greatest0fallt1me merged commit 82e42b5 into CalloraOrg:main Feb 28, 2026
1 check failed
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.

Add REST Route: Revoke API Key

2 participants