Skip to main content

Logging Callbacks API

This page documents the 2 gateway endpoints tagged Logging Callbacks 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/callbacks/listList the active logging callbacks
GET/callbacks/configsDescribe every logging callback the gateway can add

Endpoints​

GET /callbacks/list​

List the active logging callbacks

Return the names of the logging callbacks running on this gateway, grouped by whether they receive successful requests (success), failed requests (failure) or both (success_and_failure).

The list covers callbacks set in the config file and callbacks added from the Admin UI. A name that is missing here is not logging anything, whatever the config says, so this is the first check when a destination stays empty.

Docs

Example request:

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

Responses:

StatusDescriptionBody
200The callback names grouped by the events they receive.application/json CallbacksByType
401The request carried no valid virtual key or master key.application/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
successarray of stringYesSuccess
failurearray of stringYesFailure
success_and_failurearray of stringYesSuccess And Failure

GET /callbacks/configs​

Describe every logging callback the gateway can add

Return the catalogue of logging destinations the Admin UI can add, one entry per destination.

Each entry names the callback (id), its display name and logo, whether a team or key may use it as its own destination (supports_key_team_logging), the fields its form asks for (dynamic_params, each with a type, label, description and whether it is required), the docs page and whether the Test action is offered.

Docs

Example request:

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

Responses:

StatusDescriptionBody
200One entry per destination with the fields its form needs.application/json array of CallbackConfig
401The request carried no valid virtual key or master key.application/json ErrorDetail