Documentation Index
Fetch the complete documentation index at: https://docs.draskencloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Concept
The gateway uses a three-level hierarchy for routing traffic to backends:
App → Version → Revision → Backend
| Level | Purpose |
|---|
| App | Top-level service registered on the gateway |
| Version | Public API version (v1, v2, 2026-01) — maps to a gateway path |
| Revision | Concrete backend deployment — holds the upstream URL and policy |
Versions
A version represents a public-facing API version. Requests to /payments/v1/* are matched by a version with gateway_path = /payments/v1.
Create a Version
curl -X POST http://localhost:9090/api/v1/apps/{app_id}/versions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"version": "v1"
}'
The gateway_path is auto-derived as <app.gateway_path>/v1. Override it explicitly:
{
"version": "v1",
"gateway_path": "/payments/v1"
}
Version Status
| Status | Behaviour |
|---|
active | Accepts traffic normally |
deprecated | Accepts traffic, logs a deprecation warning |
retired | Returns 410 Gone to all requests |
curl -X PATCH http://localhost:9090/api/v1/apps/{app_id}/versions/{version_id} \
-H "Content-Type: application/json" \
-d '{"status": "deprecated"}'
Revisions
A revision holds the actual backend connection details. Multiple revisions can be active simultaneously for canary / weighted routing.
Create a Revision
curl -X POST http://localhost:9090/api/v1/apps/{app_id}/versions/{version_id}/revisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"revision": "r1",
"backend_scheme": "https",
"backend_host": "api.internal.example.com",
"backend_port": 443,
"backend_base_path": "/",
"strip_gateway_path": true,
"traffic_weight": 100,
"health_check_path": "/health"
}'
Revision Fields
| Field | Default | Description |
|---|
revision | required | Label (e.g. r1, canary) |
backend_scheme | https | http or https |
backend_host | required | Upstream hostname |
backend_port | 443 | Upstream port |
backend_base_path | / | Path prefix prepended on the upstream request |
strip_gateway_path | true | Strip the version’s gateway_path before forwarding |
traffic_weight | 100 | Relative weight for weighted routing |
health_check_path | — | Path used by the circuit breaker health probe |
default_policy | — | Policy applied to all requests through this revision |
Activate a Revision
curl -X POST http://localhost:9090/api/v1/apps/{app_id}/versions/{version_id}/revisions/{revision_id}/activate \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN"
Canary / Weighted Routing
Run two revisions simultaneously with weighted traffic splitting:
# 90% to stable
curl -X PATCH .../revisions/{stable_id} -d '{"traffic_weight": 90}'
# 10% to canary
curl -X PATCH .../revisions/{canary_id} -d '{"traffic_weight": 10}'
Both must have is_current: true. The gateway distributes traffic proportionally.
Path Forwarding
With strip_gateway_path: true (default):
Request: GET /payments/v1/invoices
Upstream: GET /invoices
With strip_gateway_path: false:
Request: GET /payments/v1/invoices
Upstream: GET /payments/v1/invoices