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.
| Method | Path | Summary |
|---|---|---|
| GET | /status/overview | Full status report for admins |
| GET | /status/suggestions | Model groups and providers that deserve an incident |
| GET | /status/incidents | List incidents |
| POST | /status/incidents | Open an incident |
| GET | /status/incidents/{incident_id} | Read one incident |
| PATCH | /status/incidents/{incident_id} | Update an incident |
| POST | /status/incidents/{incident_id}/resolve | Resolve 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:
| Status | Description | Body |
|---|---|---|
| 200 | Uptime, daily series and incidents for every model group and provider | application/json StatusReport |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin or admin viewer key and no custom role grants the route | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
status | enum: "operational", "degraded", "outage", "unknown" | Yes | Status |
generated_at | string | Yes | Generated At |
model_groups | array of EntityStatus | Yes | Model Groups |
providers | array of EntityStatus | Yes | Providers |
incidents | array of PublicIncident | Yes | Incidents |
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:
| Status | Description | Body |
|---|---|---|
| 200 | Targets under the uptime threshold with no open incident | application/json IncidentSuggestions |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin or admin viewer key and no custom role grants the route | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
threshold_pct | number | Yes | Threshold Pct |
suggestions | array of IncidentSuggestion | Yes | Suggestions |
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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
open_only | query | boolean | No | |
page | query | integer | No | |
page_size | query | integer | No |
Example request:
curl -X GET "http://localhost:4000/status/incidents" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One page of incidents, newest first | application/json IncidentList |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin or admin viewer key and no custom role grants the route | 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 |
|---|---|---|---|
incidents | array of Incident | Yes | Incidents |
total | integer | Yes | Total |
page | integer | Yes | Page |
page_size | integer | Yes | Page 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):
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Title |
message | string | Yes | Message |
status | enum: "investigating", "identified", "monitoring" | No | Status |
impact | enum: "none", "minor", "major", "critical" | No | Impact |
model_groups | array of string | No | Model Groups |
providers | array of string | No | Providers |
is_public | boolean | No | Is Public |
started_at | string or null | No | Started 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:
| Status | Description | Body |
|---|---|---|
| 200 | The new incident with its first timeline entry | application/json Incident |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key and no custom role grants the route | 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 |
|---|---|---|---|
incident_id | string | Yes | Incident Id |
title | string | Yes | Title |
status | enum: "investigating", "identified", "monitoring", "resolved" | Yes | Status |
impact | enum: "none", "minor", "major", "critical" | Yes | Impact |
model_groups | array of string | Yes | Model Groups |
providers | array of string | Yes | Providers |
is_public | boolean | Yes | Is Public |
updates | array of IncidentUpdate | Yes | Updates |
started_at | string | Yes | Started At |
resolved_at | string or null | Yes | Resolved At |
created_by | string or null | Yes | Created By |
created_at | string | Yes | Created At |
updated_at | string | Yes | Updated 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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
incident_id | path | string | Yes |
Example request:
curl -X GET "http://localhost:4000/status/incidents/incident_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The incident with its full timeline | application/json Incident |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin or admin viewer key and no custom role grants the route | application/json ErrorDetail |
| 404 | No incident has that id | 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 |
|---|---|---|---|
incident_id | string | Yes | Incident Id |
title | string | Yes | Title |
status | enum: "investigating", "identified", "monitoring", "resolved" | Yes | Status |
impact | enum: "none", "minor", "major", "critical" | Yes | Impact |
model_groups | array of string | Yes | Model Groups |
providers | array of string | Yes | Providers |
is_public | boolean | Yes | Is Public |
updates | array of IncidentUpdate | Yes | Updates |
started_at | string | Yes | Started At |
resolved_at | string or null | Yes | Resolved At |
created_by | string or null | Yes | Created By |
created_at | string | Yes | Created At |
updated_at | string | Yes | Updated 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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
incident_id | path | string | Yes |
Request body (application/json, schema UpdateIncident):
| Field | Type | Required | Description |
|---|---|---|---|
title | string or null | No | Title |
message | string or null | No | Message |
status | enum: "investigating", "identified", "monitoring" or null | No | Status |
impact | enum: "none", "minor", "major", "critical" or null | No | Impact |
model_groups | array of string or null | No | Model Groups |
providers | array of string or null | No | Providers |
is_public | boolean or null | No | Is 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:
| Status | Description | Body |
|---|---|---|
| 200 | The incident after the change | application/json Incident |
| 400 | The body names no field to change | 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 and no custom role grants the route | application/json ErrorDetail |
| 404 | No incident has that id | 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 |
|---|---|---|---|
incident_id | string | Yes | Incident Id |
title | string | Yes | Title |
status | enum: "investigating", "identified", "monitoring", "resolved" | Yes | Status |
impact | enum: "none", "minor", "major", "critical" | Yes | Impact |
model_groups | array of string | Yes | Model Groups |
providers | array of string | Yes | Providers |
is_public | boolean | Yes | Is Public |
updates | array of IncidentUpdate | Yes | Updates |
started_at | string | Yes | Started At |
resolved_at | string or null | Yes | Resolved At |
created_by | string or null | Yes | Created By |
created_at | string | Yes | Created At |
updated_at | string | Yes | Updated 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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
incident_id | path | string | Yes |
Request body (application/json, schema ResolveIncident):
| Field | Type | Required | Description |
|---|---|---|---|
message | string or null | No | Message |
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:
| Status | Description | Body |
|---|---|---|
| 200 | The incident marked resolved with its closing message | application/json Incident |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key and no custom role grants the route | application/json ErrorDetail |
| 404 | No incident has that id | application/json ErrorDetail |
| 409 | The incident is already resolved | 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 |
|---|---|---|---|
incident_id | string | Yes | Incident Id |
title | string | Yes | Title |
status | enum: "investigating", "identified", "monitoring", "resolved" | Yes | Status |
impact | enum: "none", "minor", "major", "critical" | Yes | Impact |
model_groups | array of string | Yes | Model Groups |
providers | array of string | Yes | Providers |
is_public | boolean | Yes | Is Public |
updates | array of IncidentUpdate | Yes | Updates |
started_at | string | Yes | Started At |
resolved_at | string or null | Yes | Resolved At |
created_by | string or null | Yes | Created By |
created_at | string | Yes | Created At |
updated_at | string | Yes | Updated At |