FluxGate Management API
High-Performance API Gateway for Microservices
Endpoints List
Core RESTful endpoints for configuring routes, managing upstream clusters, and injecting middleware. All paths are scoped under `/api/v2/gateway`.
Route Configuration
GET /routesRetrieve, create, or update routing rules. Supports path, prefix, and regex matching with weighted load balancing.
POST /routes PUT /routes/:id DELETE /routes/:idUpstream Clusters
GET /upstreamsManage backend service pools. Configure health checks, circuit breakers, and connection pooling limits.
POST /upstreams PATCH /upstreams/:idMiddleware Pipeline
GET /middlewareAttach request/response filters including rate limiting, JWT validation, and CORS enforcement.
POST /middleware/:id/attach DELETE /middleware/:id/detachRequest & Response Examples
Standard JSON payloads for provisioning a new routing rule with JWT authentication and rate limiting.
POST /api/v2/gateway/routes
{
"name": "checkout-service-v2",
"match": {
"path": "/api/v1/checkout",
"methods": ["POST", "PUT"]
},
"upstream": {
"id": "usm_8f3a2c1d",
"strategy": "round-robin"
},
"middleware": [
{"type": "jwt-auth", "config": {"issuer": "auth.fluxgate.io"}},
{"type": "rate-limit", "config": {"requests": 100, "window": "60s"}}
]
}
201 Created Response
{
"id": "rt_9b4e7f2a",
"status": "active",
"created_at": "2024-03-15T14:22:08Z",
"hash": "a3f8c9d2e1b0",
"links": {
"self": "/api/v2/gateway/routes/rt_9b4e7f2a",
"upstream": "/api/v2/gateway/upstreams/usm_8f3a2c1d"
},
"metrics": {
"avg_latency_ms": 12,
"error_rate_1h": 0.002
}
}
Error Codes
FluxGate returns standard HTTP status codes with structured JSON error objects. Always check the `code` field for programmatic handling.
400 Bad Request
INVALID_PAYLOADMissing required fields, malformed JSON, or invalid route regex patterns. Check `details.field` for exact validation failures.
401 Unauthorized
MISSING_API_KEYThe `X-FluxGate-API-Key` header is absent or expired. Rotate credentials via the dashboard or regenerate via CLI.
409 Conflict
DUPLICATE_ROUTEA route with the same match criteria and upstream target already exists. Use `PATCH` to update or `DELETE` to replace.
429 Rate Limit Exceeded
API_QUOTA_EXHAUSTEDManagement API calls exceed 500 requests per minute. Backoff exponentially and retry after `Retry-After` header value.