Coordination Redis Settings API
This page documents the 3 gateway endpoints tagged Coordination Redis 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 | /coordination_redis/settings | Read the coordination Redis settings |
| POST | /coordination_redis/settings | Save the coordination Redis settings |
| POST | /coordination_redis/settings/test | Test a coordination Redis connection |
Endpoints
GET /coordination_redis/settings
Read the coordination Redis settings
Read the Redis connection the gateway's replicas use to share rate limits, cooldowns and scheduled jobs. Proxy admins and admin viewers may call it. The answer holds the saved values with the password, sentinel password and url redacted, the definition of every setting the Admin UI shows, and where the active values come from. Nothing changes. Docs
Example request:
curl -X GET "http://localhost:4000/coordination_redis/settings" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The saved values, credentials redacted, with the field definitions and where the values come from | application/json CoordinationRedisSettingsResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
values | object | Yes | Current coordination Redis settings, with credentials redacted |
fields | array of CoordinationRedisSettingsField | Yes | List of all configurable coordination Redis settings with metadata |
source | enum: "coordination_redis", "cache_backend", "environment" or null | Yes | Where the proxy's coordination Redis comes from; null when it has none |
POST /coordination_redis/settings
Save the coordination Redis settings
Save the Redis connection the gateway's replicas use to share rate limits, cooldowns and scheduled jobs. Only proxy admins may call it, and the gateway needs a database with STORE_MODEL_IN_DB set. Values may be os.environ/VAR references, which are stored as written and resolved at startup. A credential sent back as REDACTED keeps its saved value. The settings are stored in the database and apply at the next restart, and the before and after are written to the audit log with credentials redacted. Docs
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
spanway-changed-by | header | string or null | No | The spanway-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability |
Request body (application/json, schema CoordinationRedisSettingsRequest):
| Field | Type | Required | Description |
|---|---|---|---|
settings | object | Yes | Coordination Redis connection params |
Example request:
curl -X POST "http://localhost:4000/coordination_redis/settings" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"host": "redis.internal",
"port": 6379,
"password": "s3cret"
}
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The settings are stored and take effect at the next restart | application/json CoordinationRedisUpdateResponse |
| 400 | A value is not a valid Redis connection parameter or no host, url or sentinel is given | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What changed and that a restart applies it |
status | string | Yes | Always success, failures are reported as HTTP errors |
settings | object | Yes | The saved settings with credentials redacted |
POST /coordination_redis/settings/test
Test a coordination Redis connection
Check that a Redis connection works before saving it. Only proxy admins may call it. The gateway builds a throwaway client from the settings sent, pings it once and reports the result, and nothing is saved or changed. A credential sent back as REDACTED uses the saved value. Docs
Request body (application/json, schema CoordinationRedisSettingsRequest):
| Field | Type | Required | Description |
|---|---|---|---|
settings | object | Yes | Coordination Redis connection params |
Example request:
curl -X POST "http://localhost:4000/coordination_redis/settings/test" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"host": "redis.internal",
"port": 6379,
"password": "s3cret"
}
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The verdict of one ping with the submitted settings, a failure is a verdict and not an HTTP error | application/json CoordinationRedisTestResponse |
| 400 | A value is not a valid Redis connection parameter or no host, url or sentinel is given | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Connection status: 'healthy' or 'unhealthy' |
error | string or null | No | Error message if the connection failed |