Skip to main content

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.

MethodPathSummary
GET/config_overrides/cyberarkRead the CyberArk Conjur connection
POST/config_overrides/cyberarkSave the CyberArk Conjur connection
DELETE/config_overrides/cyberarkRemove the CyberArk Conjur connection
POST/config_overrides/cyberark/test_connectionTest the CyberArk Conjur connection
GET/config_overrides/hashicorp_vaultRead the HashiCorp Vault connection
POST/config_overrides/hashicorp_vaultSave the HashiCorp Vault connection
DELETE/config_overrides/hashicorp_vaultRemove the HashiCorp Vault connection
POST/config_overrides/hashicorp_vault/test_connectionTest 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:

StatusDescriptionBody
200The stored or environment values, secrets maskedapplication/json ConfigOverrideSettingsResponse
403The key is neither a proxy admin nor an admin viewer keyapplication/json ErrorDetail
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
config_typestringYesThe type of config override
field_schemaobjectYesSchema information for UI rendering
valuesobjectYesCurrent 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:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe 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):

FieldTypeRequiredDescription
client_certstring or nullNoPath to the client TLS certificate for certificate-based authentication
client_keystring or nullNoPath to the client TLS private key for certificate-based authentication
cyberark_accountstring or nullNoThe Conjur organization account name
cyberark_api_basestring or nullNoThe address of the CyberArk Conjur server (e.g., https://conjur.example.com)
cyberark_api_keystring or nullNoAPI key for Conjur API-key authentication
cyberark_usernamestring or nullNoThe Conjur username (login) to authenticate as
refresh_intervalstring or nullNoAuth token cache TTL in seconds (default: 300)
ssl_verifystring or nullNoSet 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:

StatusDescriptionBody
200Conjur answered and the connection is storedapplication/json ConfigOverrideMutationResponse
400The server address or an authentication method is missingapplication/json ErrorDetail
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500Conjur refused the login, the database write failed or no database is connected. Nothing was storedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat changed
status"success"YesAlways 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:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe 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:

StatusDescriptionBody
200The stored connection is gone and the deployment's CYBERARK_* variables are back in forceapplication/json ConfigOverrideMutationResponse
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat changed
status"success"YesAlways 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:

StatusDescriptionBody
200The gateway authenticated and Conjur answered whoamiapplication/json ConfigOverrideConnectionTestResponse
400No Conjur connection is loadedapplication/json ErrorDetail
403The key is not a proxy admin keyapplication/json ErrorDetail
502Conjur refused the login or the whoami callapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesThe secret manager address the gateway reached
status"success"YesAlways 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:

StatusDescriptionBody
200The stored or environment values, secrets maskedapplication/json ConfigOverrideSettingsResponse
403The key is neither a proxy admin nor an admin viewer keyapplication/json ErrorDetail
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
config_typestringYesThe type of config override
field_schemaobjectYesSchema information for UI rendering
valuesobjectYesCurrent 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:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe 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):

FieldTypeRequiredDescription
approle_mount_pathstring or nullNoMount path for the AppRole auth method (default: approle)
approle_role_idstring or nullNoRole ID for Vault AppRole authentication
approle_secret_idstring or nullNoSecret ID for Vault AppRole authentication
client_certstring or nullNoPath to the client TLS certificate for Vault
client_keystring or nullNoPath to the client TLS private key for Vault
vault_addrstring or nullNoThe address of the Vault server (e.g., https://vault.example.com:8200)
vault_cert_rolestring or nullNoCertificate role name for TLS cert authentication
vault_login_namespacestring or nullNoNamespace for AppRole and TLS cert login (X-Vault-Namespace header); falls back to vault_namespace
vault_mount_namestring or nullNoKV engine mount name (default: secret)
vault_namespacestring or nullNoVault namespace used for both login and secret operations unless overridden below
vault_path_prefixstring or nullNoOptional path prefix for secrets (e.g., myapp -> secret/data/myapp/{secret_name})
vault_secret_namespacestring or nullNoNamespace for secret reads and writes (URL path segment); falls back to vault_namespace
vault_tokenstring or nullNoToken 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:

StatusDescriptionBody
200Vault answered and the connection is storedapplication/json ConfigOverrideMutationResponse
400The address or an authentication method is missingapplication/json ErrorDetail
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500Vault refused the login, the database write failed or no database is connected. Nothing was storedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat changed
status"success"YesAlways 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:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe 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:

StatusDescriptionBody
200The stored connection is gone and the secret manager is unloadedapplication/json ConfigOverrideMutationResponse
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat changed
status"success"YesAlways 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:

StatusDescriptionBody
200The gateway logged in and Vault confirmed the tokenapplication/json ConfigOverrideConnectionTestResponse
400No Vault connection is loadedapplication/json ErrorDetail
403The key is not a proxy admin keyapplication/json ErrorDetail
502Vault refused the login or the token lookupapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesThe secret manager address the gateway reached
status"success"YesAlways success, a failed test is reported as HTTP 400 or 502