Skip to main content

Alerting API

This page documents the 1 gateway endpoint tagged alerting 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/alerting/settingsList the alerting settings and their current values

Endpoints​

GET /alerting/settings​

List the alerting settings and their current values

Return every alerting setting the Admin UI can edit, such as whether Slack alerts are on, how often the latency and failure report is sent and the spend thresholds, with its type, description, current value and whether the value is stored in the database. The Alerting page of the Admin UI is built from it. Proxy admins and admin viewers may call it, and nothing changes.

Example request:

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

Responses:

StatusDescriptionBody
200Successful Responseapplication/json array of ConfigList
400No database is connectedapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin or admin viewerapplication/json ErrorDetail