Router Settings API
This page documents the 2 gateway endpoints tagged Router Settings in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /router/settings | Read the router settings |
| GET | /router/fields | Describe the router settings without values |
Endpoints
GET /router/settings
Read the router settings
Get router configuration and available settings.
What you get back:
- fields: List of all configurable router settings with their metadata (type, description, default, options) The routing_strategy field includes available options extracted from the Router class
- current_values: Current values of router settings from config
Example request:
curl -X GET "http://localhost:4000/router/settings" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Every router setting with its metadata, current value and where that value came from | application/json RouterSettingsResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
fields | array of RouterSettingsField | Yes | List of all configurable router settings with metadata |
current_values | object | Yes | Current values of router settings |
routing_strategy_descriptions | object | Yes | Descriptions for each routing strategy option |
routing_group_strategies | array of string | Yes | Strategies supported when constructing a routing group |
source | object | Yes | Source of each current router setting |
profiles | array of RouterSettingsProfile | Yes | Named partial router settings an admin can merge into the current settings before saving |
GET /router/fields
Describe the router settings without values
Get router settings field definitions without values.
Returns only the field metadata (type, description, default, options) without populating field_value. This is useful for UI components that need to know what fields to render, but will get the actual values from a different endpoint.
What you get back:
- fields: List of all configurable router settings with their metadata (type, description, default, options) The routing_strategy field includes available options extracted from the Router class Note: field_value will be None for all fields
- routing_strategy_descriptions: Descriptions for each routing strategy option
Example request:
curl -X GET "http://localhost:4000/router/fields" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The field definitions the Admin UI renders the Router Settings form from | application/json RouterFieldsResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
fields | array of RouterSettingsField | Yes | List of all configurable router settings with metadata (without field values) |
routing_strategy_descriptions | object | Yes | Descriptions for each routing strategy option |
routing_group_strategies | array of string | Yes | Strategies supported when constructing a routing group |