API Reference
Complete REST API reference for FlexGate Proxy.
Base URL: http://localhost:3001
Authentication
All admin API endpoints require an API key in the Authorization header:
Authorization: Bearer <your-api-key>Rate Limits
| Endpoint Group | Limit |
|---|---|
All /api/* | 100 req / min |
| Admin APIs | 60 req / min |
/api/auth | 5 req / 15 min |
Endpoints
Health
GET /health — Basic health check
GET /health/live — Kubernetes liveness probe
GET /health/ready — Kubernetes readiness probe
GET /health/deep — Full dependency health (DB, Redis, NATS)
Routes
GET /api/routes — List all routes
POST /api/routes — Create a route
PUT /api/routes/:id — Update a route
DELETE /api/routes/:id — Delete a route
Webhooks
GET /api/webhooks — List subscriptions
POST /api/webhooks — Create subscription
PUT /api/webhooks/:id — Update subscription
DELETE /api/webhooks/:id — Delete subscription
POST /api/webhooks/:id/test — Test delivery
Metrics & Logs
GET /api/metrics — Current metrics snapshot
GET /api/logs — Audit logs (paginated)
GET /api/stream/metrics — SSE real-time metrics stream
GET /api/stream/alerts — SSE real-time alerts stream
GET /prometheus/metrics — Prometheus scrape endpoint
Settings
GET /api/settings — Get current settings
PUT /api/settings — Update settings
POST /api/settings/backup — Create settings backup
GET /api/settings/ai — AI provider settings
PUT /api/settings/ai — Update AI provider settings
GET /api/settings/claude — Claude-specific settings
PUT /api/settings/claude — Update Claude settings
AI & Incidents
GET /api/ai/health — AI service health
GET /api/ai-incidents — List AI incidents
POST /api/ai-incidents — Create incident
GET /api/ai-incidents/:id — Get incident detail
PUT /api/ai-incidents/:id — Update incident
DELETE /api/ai-incidents/:id — Delete incident
Troubleshooting
GET /api/troubleshooting/health — Full diagnostic report
GET /api/troubleshooting/connections — Check all service connections
POST /api/troubleshooting/test-upstream — Test upstream reachability
For full request/response schemas see api.md.