Skip to main content

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.

MethodPathSummary
GET/router/settingsRead the router settings
GET/router/fieldsDescribe 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:

StatusDescriptionBody
200Every router setting with its metadata, current value and where that value came fromapplication/json RouterSettingsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
fieldsarray of RouterSettingsFieldYesList of all configurable router settings with metadata
current_valuesobjectYesCurrent values of router settings
routing_strategy_descriptionsobjectYesDescriptions for each routing strategy option
routing_group_strategiesarray of stringYesStrategies supported when constructing a routing group
sourceobjectYesSource of each current router setting
profilesarray of RouterSettingsProfileYesNamed 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:

StatusDescriptionBody
200The field definitions the Admin UI renders the Router Settings form fromapplication/json RouterFieldsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
fieldsarray of RouterSettingsFieldYesList of all configurable router settings with metadata (without field values)
routing_strategy_descriptionsobjectYesDescriptions for each routing strategy option
routing_group_strategiesarray of stringYesStrategies supported when constructing a routing group