Skip to main content

Status page API

This page documents the 7 gateway endpoints tagged status page 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/status/overviewFull status report for admins
GET/status/suggestionsModel groups and providers that deserve an incident
GET/status/incidentsList incidents
POST/status/incidentsOpen an incident
GET/status/incidents/{incident_id}Read one incident
PATCH/status/incidents/{incident_id}Update an incident
POST/status/incidents/{incident_id}/resolveResolve an incident

Endpoints​

GET /status/overview​

Full status report for admins

Uptime over 24h, 7d and 30d, daily latency and throughput for every model group and provider, and the open incidents plus those resolved in the last 14 days, private ones included, even when they name a model group or provider the router no longer serves. Without a database it answers 200 with status unknown and no incidents. Proxy admins and admin viewers may call it. It changes nothing, the report is cached briefly and every incident change clears the cache.

Example request:

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

Responses:

StatusDescriptionBody
200Uptime, daily series and incidents for every model group and providerapplication/json StatusReport
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin or admin viewer key and no custom role grants the routeapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
statusenum: "operational", "degraded", "outage", "unknown"YesStatus
generated_atstringYesGenerated At
model_groupsarray of EntityStatusYesModel Groups
providersarray of EntityStatusYesProviders
incidentsarray of PublicIncidentYesIncidents

GET /status/suggestions​

Model groups and providers that deserve an incident

Model groups and providers whose 24h uptime is under general_settings.status_incident_uptime_threshold and no open incident covers yet, each with a suggested title and impact. Proxy admins and admin viewers may call it, and nothing is opened until an admin creates the incident.

Example request:

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

Responses:

StatusDescriptionBody
200Targets under the uptime threshold with no open incidentapplication/json IncidentSuggestions
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin or admin viewer key and no custom role grants the routeapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
threshold_pctnumberYesThreshold Pct
suggestionsarray of IncidentSuggestionYesSuggestions

GET /status/incidents​

List incidents

Incidents newest first, public and private, optionally only the unresolved ones, one page at a time. Proxy admins and admin viewers may call it and it changes nothing.

Parameters:

NameInTypeRequiredDescription
open_onlyquerybooleanNo
pagequeryintegerNo
page_sizequeryintegerNo

Example request:

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

Responses:

StatusDescriptionBody
200One page of incidents, newest firstapplication/json IncidentList
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin or admin viewer key and no custom role grants the routeapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
incidentsarray of IncidentYesIncidents
totalintegerYesTotal
pageintegerYesPage
page_sizeintegerYesPage Size

POST /status/incidents​

Open an incident

Opens an incident with its first timeline entry. Public incidents show on /public/status for the public model groups and providers they name, or for the whole gateway when they name none. Proxy admins only, and the change is written to the audit log.

Request body (application/json, schema NewIncident):

FieldTypeRequiredDescription
titlestringYesTitle
messagestringYesMessage
statusenum: "investigating", "identified", "monitoring"NoStatus
impactenum: "none", "minor", "major", "critical"NoImpact
model_groupsarray of stringNoModel Groups
providersarray of stringNoProviders
is_publicbooleanNoIs Public
started_atstring or nullNoStarted At

Example request:

curl -X POST "http://localhost:4000/status/incidents" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Elevated errors on gpt-5.5",
"message": "We are seeing failures from one provider and are failing over.",
"impact": "minor",
"model_groups": [
"gpt-5.5"
]
}'

Responses:

StatusDescriptionBody
200The new incident with its first timeline entryapplication/json Incident
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin key and no custom role grants the routeapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
incident_idstringYesIncident Id
titlestringYesTitle
statusenum: "investigating", "identified", "monitoring", "resolved"YesStatus
impactenum: "none", "minor", "major", "critical"YesImpact
model_groupsarray of stringYesModel Groups
providersarray of stringYesProviders
is_publicbooleanYesIs Public
updatesarray of IncidentUpdateYesUpdates
started_atstringYesStarted At
resolved_atstring or nullYesResolved At
created_bystring or nullYesCreated By
created_atstringYesCreated At
updated_atstringYesUpdated At

GET /status/incidents/{incident_id}​

Read one incident

One incident with its full update timeline, public or private. Proxy admins and admin viewers may call it.

Parameters:

NameInTypeRequiredDescription
incident_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/status/incidents/incident_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The incident with its full timelineapplication/json Incident
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin or admin viewer key and no custom role grants the routeapplication/json ErrorDetail
404No incident has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
incident_idstringYesIncident Id
titlestringYesTitle
statusenum: "investigating", "identified", "monitoring", "resolved"YesStatus
impactenum: "none", "minor", "major", "critical"YesImpact
model_groupsarray of stringYesModel Groups
providersarray of stringYesProviders
is_publicbooleanYesIs Public
updatesarray of IncidentUpdateYesUpdates
started_atstringYesStarted At
resolved_atstring or nullYesResolved At
created_bystring or nullYesCreated By
created_atstringYesCreated At
updated_atstringYesUpdated At

PATCH /status/incidents/{incident_id}​

Update an incident

Changes only the fields sent. A message or a new status adds an entry to the public timeline, and a status on a resolved incident reopens it. Proxy admins only, and the before and after values go to the audit log.

Parameters:

NameInTypeRequiredDescription
incident_idpathstringYes

Request body (application/json, schema UpdateIncident):

FieldTypeRequiredDescription
titlestring or nullNoTitle
messagestring or nullNoMessage
statusenum: "investigating", "identified", "monitoring" or nullNoStatus
impactenum: "none", "minor", "major", "critical" or nullNoImpact
model_groupsarray of string or nullNoModel Groups
providersarray of string or nullNoProviders
is_publicboolean or nullNoIs Public

Example request:

curl -X PATCH "http://localhost:4000/status/incidents/incident_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "monitoring",
"message": "Failover is in place and errors are back to normal."
}'

Responses:

StatusDescriptionBody
200The incident after the changeapplication/json Incident
400The body names no field to changeapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin key and no custom role grants the routeapplication/json ErrorDetail
404No incident has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
incident_idstringYesIncident Id
titlestringYesTitle
statusenum: "investigating", "identified", "monitoring", "resolved"YesStatus
impactenum: "none", "minor", "major", "critical"YesImpact
model_groupsarray of stringYesModel Groups
providersarray of stringYesProviders
is_publicbooleanYesIs Public
updatesarray of IncidentUpdateYesUpdates
started_atstringYesStarted At
resolved_atstring or nullYesResolved At
created_bystring or nullYesCreated By
created_atstringYesCreated At
updated_atstringYesUpdated At

POST /status/incidents/{incident_id}/resolve​

Resolve an incident

Marks the incident resolved now and adds the closing message to its public timeline. Proxy admins only, and the before and after values go to the audit log.

Parameters:

NameInTypeRequiredDescription
incident_idpathstringYes

Request body (application/json, schema ResolveIncident):

FieldTypeRequiredDescription
messagestring or nullNoMessage

Example request:

curl -X POST "http://localhost:4000/status/incidents/incident_id-123/resolve" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "The provider recovered and all traffic is back on its usual route."
}'

Responses:

StatusDescriptionBody
200The incident marked resolved with its closing messageapplication/json Incident
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin key and no custom role grants the routeapplication/json ErrorDetail
404No incident has that idapplication/json ErrorDetail
409The incident is already resolvedapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
incident_idstringYesIncident Id
titlestringYesTitle
statusenum: "investigating", "identified", "monitoring", "resolved"YesStatus
impactenum: "none", "minor", "major", "critical"YesImpact
model_groupsarray of stringYesModel Groups
providersarray of stringYesProviders
is_publicbooleanYesIs Public
updatesarray of IncidentUpdateYesUpdates
started_atstringYesStarted At
resolved_atstring or nullYesResolved At
created_bystring or nullYesCreated By
created_atstringYesCreated At
updated_atstringYesUpdated At