Skip to main content

Experimental API

This page documents the 1 gateway endpoint tagged experimental 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/sso/readinessCheck the single sign-on setup

Endpoints​

GET /sso/readiness​

Check the single sign-on setup

Tell whether Admin UI single sign-on can work on this instance. The gateway looks for GOOGLE_CLIENT_ID, MICROSOFT_CLIENT_ID, GENERIC_CLIENT_ID and then the SAML variables in that order, and checks that the chosen provider's secret and, for Microsoft and the generic provider, its tenant or endpoints are set. SAML needs SAML_IDP_METADATA_URL or SAML_IDP_METADATA_XML. A gateway without any provider is healthy. Any valid key may call it, and the answer never contains a secret value.

Docs (https://docs.spanway.ai/docs/proxy/diagnostics)

Example request:

curl -X GET "http://localhost:4000/sso/readiness" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200No provider is configured, or the configured one has every variable it needsapplication/json SSOReadiness
401No valid key or Admin UI session was presentedapplication/json ProxyError
503A provider client id is set but a variable it needs is missingapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
status"healthy"Yeshealthy, an incomplete setup is reported as HTTP 503 instead
sso_configuredbooleanYesFalse when no provider client id is set, which is a healthy state too
providerenum: "google", "microsoft", "generic", "saml" or nullNoThe provider found, absent when none is configured
messagestringYesOne line a person can read