feat(public-api): T36-T38 implement public API endpoints
- GET /api/v1/stats: aggregated stats with date range (default 30 days) - GET /api/v1/usage: paginated usage with required date filters - GET /api/v1/keys: key list with stats, no key values exposed - All endpoints use API token auth and rate limiting
This commit is contained in:
@@ -8,6 +8,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
from openrouter_monitor.config import get_settings
|
||||
from openrouter_monitor.routers import api_keys
|
||||
from openrouter_monitor.routers import auth
|
||||
from openrouter_monitor.routers import public_api
|
||||
from openrouter_monitor.routers import stats
|
||||
|
||||
settings = get_settings()
|
||||
@@ -33,6 +34,7 @@ app.add_middleware(
|
||||
app.include_router(auth.router, prefix="/api/auth", tags=["authentication"])
|
||||
app.include_router(api_keys.router, prefix="/api/keys", tags=["api-keys"])
|
||||
app.include_router(stats.router)
|
||||
app.include_router(public_api.router)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
|
||||
Reference in New Issue
Block a user