Config overrides API
This page documents the 8 gateway endpoints tagged config_overrides 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 | /config_overrides/cyberark | Read the CyberArk Conjur connection |
| POST | /config_overrides/cyberark | Save the CyberArk Conjur connection |
| DELETE | /config_overrides/cyberark | Remove the CyberArk Conjur connection |
| POST | /config_overrides/cyberark/test_connection | Test the CyberArk Conjur connection |
| GET | /config_overrides/hashicorp_vault | Read the HashiCorp Vault connection |
| POST | /config_overrides/hashicorp_vault | Save the HashiCorp Vault connection |
| DELETE | /config_overrides/hashicorp_vault | Remove the HashiCorp Vault connection |
| POST | /config_overrides/hashicorp_vault/test_connection | Test the HashiCorp Vault connection |
Endpoints
GET /config_overrides/cyberark
Read the CyberArk Conjur connection
The CyberArk Conjur connection the gateway uses, with the API key and client key masked.
Values come from the stored connection, or from the CYBERARK_* environment variables when nothing is stored.
field_schema describes every field for the Admin UI form. Proxy admins and admin viewers.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
Example request:
curl -X GET "http://localhost:4000/config_overrides/cyberark" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The stored or environment values, secrets masked | application/json ConfigOverrideSettingsResponse |
| 403 | The key is neither a proxy admin nor an admin viewer key | application/json ErrorDetail |
| 500 | The gateway runs without a database | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
config_type | string | Yes | The type of config override |
field_schema | object | Yes | Schema information for UI rendering |
values | object | Yes | Current configuration values (sensitive fields decrypted) |
POST /config_overrides/cyberark
Save the CyberArk Conjur connection
Store the CyberArk Conjur connection the gateway reads os.environ/NAME secrets from, without a restart.
Fields you leave out keep their stored value, or the value of the matching CYBERARK_* environment variable when
nothing is stored yet. An empty string clears a field. The gateway authenticates to Conjur with the merged settings
first and only stores them, encrypted with the salt key, once that succeeded. The change is written to the audit
log with secret values redacted. Proxy admin only.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
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 CyberArkConfig):
| Field | Type | Required | Description |
|---|---|---|---|
client_cert | string or null | No | Path to the client TLS certificate for certificate-based authentication |
client_key | string or null | No | Path to the client TLS private key for certificate-based authentication |
cyberark_account | string or null | No | The Conjur organization account name |
cyberark_api_base | string or null | No | The address of the CyberArk Conjur server (e.g., https://conjur.example.com) |
cyberark_api_key | string or null | No | API key for Conjur API-key authentication |
cyberark_username | string or null | No | The Conjur username (login) to authenticate as |
refresh_interval | string or null | No | Auth token cache TTL in seconds (default: 300) |
ssl_verify | string or null | No | Set to false to disable SSL verification (e.g., for self-signed certificates) |
Example request:
curl -X POST "http://localhost:4000/config_overrides/cyberark" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cyberark_account": "myorg",
"cyberark_api_base": "https://conjur.example.com",
"cyberark_api_key": "3qf5x9m2k8p1w7n4j6h0",
"cyberark_username": "host/spanway-gateway",
"refresh_interval": "300",
"ssl_verify": "true"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Conjur answered and the connection is stored | application/json ConfigOverrideMutationResponse |
| 400 | The server address or an authentication method is missing | application/json ErrorDetail |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | Conjur refused the login, the database write failed or no database is connected. Nothing was stored | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What changed |
status | "success" | Yes | Always success, failures are reported as HTTP errors |
DELETE /config_overrides/cyberark
Remove the CyberArk Conjur connection
Delete the stored CyberArk Conjur connection and put the deployment's own CYBERARK_* environment variables, if
any, back in force on this instance. Without them the secret manager is unloaded and models whose keys came from
Conjur lose them until a connection is saved again. Calling it with nothing stored also answers 200. Proxy admin
only.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
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 |
Example request:
curl -X DELETE "http://localhost:4000/config_overrides/cyberark" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The stored connection is gone and the deployment's CYBERARK_* variables are back in force | application/json ConfigOverrideMutationResponse |
| 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 |
status | "success" | Yes | Always success, failures are reported as HTTP errors |
POST /config_overrides/cyberark/test_connection
Test the CyberArk Conjur connection
Authenticate to Conjur with the stored connection and call its whoami route, without changing anything. The request has no body. Proxy admin only.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/config_overrides/cyberark/test_connection" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The gateway authenticated and Conjur answered whoami | application/json ConfigOverrideConnectionTestResponse |
| 400 | No Conjur connection is loaded | application/json ErrorDetail |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 502 | Conjur refused the login or the whoami call | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The secret manager address the gateway reached |
status | "success" | Yes | Always success, a failed test is reported as HTTP 400 or 502 |
GET /config_overrides/hashicorp_vault
Read the HashiCorp Vault connection
The HashiCorp Vault connection the gateway uses, with the token, AppRole secret id and client key masked.
Values come from the stored connection, or from the HCP_VAULT_* environment variables when nothing is stored.
field_schema describes every field for the Admin UI form. Proxy admins and admin viewers.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
Example request:
curl -X GET "http://localhost:4000/config_overrides/hashicorp_vault" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The stored or environment values, secrets masked | application/json ConfigOverrideSettingsResponse |
| 403 | The key is neither a proxy admin nor an admin viewer key | application/json ErrorDetail |
| 500 | The gateway runs without a database | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
config_type | string | Yes | The type of config override |
field_schema | object | Yes | Schema information for UI rendering |
values | object | Yes | Current configuration values (sensitive fields decrypted) |
POST /config_overrides/hashicorp_vault
Save the HashiCorp Vault connection
Store the HashiCorp Vault connection the gateway reads os.environ/NAME secrets from, without a restart.
Fields you leave out keep their stored value, or the value of the matching HCP_VAULT_* environment variable when
nothing is stored yet. An empty string clears a field. The gateway logs in to Vault with the merged settings first
and only stores them, encrypted with the salt key, once that login succeeded. The change is written to the audit
log with secret values redacted. Proxy admin only.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
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 HashicorpVaultConfig):
| Field | Type | Required | Description |
|---|---|---|---|
approle_mount_path | string or null | No | Mount path for the AppRole auth method (default: approle) |
approle_role_id | string or null | No | Role ID for Vault AppRole authentication |
approle_secret_id | string or null | No | Secret ID for Vault AppRole authentication |
client_cert | string or null | No | Path to the client TLS certificate for Vault |
client_key | string or null | No | Path to the client TLS private key for Vault |
vault_addr | string or null | No | The address of the Vault server (e.g., https://vault.example.com:8200) |
vault_cert_role | string or null | No | Certificate role name for TLS cert authentication |
vault_login_namespace | string or null | No | Namespace for AppRole and TLS cert login (X-Vault-Namespace header); falls back to vault_namespace |
vault_mount_name | string or null | No | KV engine mount name (default: secret) |
vault_namespace | string or null | No | Vault namespace used for both login and secret operations unless overridden below |
vault_path_prefix | string or null | No | Optional path prefix for secrets (e.g., myapp -> secret/data/myapp/{secret_name}) |
vault_secret_namespace | string or null | No | Namespace for secret reads and writes (URL path segment); falls back to vault_namespace |
vault_token | string or null | No | Token for Vault token-based authentication |
Example request:
curl -X POST "http://localhost:4000/config_overrides/hashicorp_vault" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"approle_role_id": "6b1c0d4e-8b32-4a2a-9d4e-1f7a2c3b4d5e",
"approle_secret_id": "s.9f8e7d6c5b4a3f2e1d0c",
"vault_addr": "https://vault.example.com:8200",
"vault_mount_name": "secret",
"vault_path_prefix": "spanway"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Vault answered and the connection is stored | application/json ConfigOverrideMutationResponse |
| 400 | The address or an authentication method is missing | application/json ErrorDetail |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | Vault refused the login, the database write failed or no database is connected. Nothing was stored | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What changed |
status | "success" | Yes | Always success, failures are reported as HTTP errors |
DELETE /config_overrides/hashicorp_vault
Remove the HashiCorp Vault connection
Delete the stored HashiCorp Vault connection, clear its HCP_VAULT_* environment variables on this instance and
unload the secret manager. Models whose keys came from Vault lose them until a connection is saved again. Calling
it with nothing stored also answers 200. Proxy admin only.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
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 |
Example request:
curl -X DELETE "http://localhost:4000/config_overrides/hashicorp_vault" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The stored connection is gone and the secret manager is unloaded | application/json ConfigOverrideMutationResponse |
| 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 |
status | "success" | Yes | Always success, failures are reported as HTTP errors |
POST /config_overrides/hashicorp_vault/test_connection
Test the HashiCorp Vault connection
Log in to Vault with the stored connection and look the token up, without changing anything. The request has no body. Proxy admin only.
Docs (https://docs.spanway.ai/docs/secret_managers/config_overrides)
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/config_overrides/hashicorp_vault/test_connection" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The gateway logged in and Vault confirmed the token | application/json ConfigOverrideConnectionTestResponse |
| 400 | No Vault connection is loaded | application/json ErrorDetail |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 502 | Vault refused the login or the token lookup | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The secret manager address the gateway reached |
status | "success" | Yes | Always success, a failed test is reported as HTTP 400 or 502 |