Skip to content

Settings

These endpoints return the configuration the dashboard needs at load time. Settings carry no secrets.

GET /api/settings and GET /api/settings/custom.css are public, so the login page can read them before the user has a token. GET /api/nats-credentials requires authentication.

GET /api/settings

Returns frontend configuration: trace links, claim durations, event transport, SSO, AI availability and branding.

Example request

Terminal window
curl -s https://lt.acme.dev/api/settings

Response 200

{
"telemetry": {
"traceUrl": "https://ui.honeycomb.io/acme/environments/test/datasets/long-tail/trace?trace_id={traceId}"
},
"escalation": {
"claimDurations": [15, 30, 60, 120, 480]
},
"events": {
"transport": "socketio",
"natsWsUrl": null,
"reconnect": { "initialDelayMs": 1000, "maxDelayMs": 60000, "noticeAfterMs": 30000, "spreadMs": 5000 }
},
"auth": {
"sso": false,
"ssoLogoutUrl": null
},
"ai": {
"enabled": true
},
"branding": {
"appName": "LongTail"
}
}
Field Type Description
telemetry.traceUrl string | null Template where {traceId} is replaced with the trace ID to build a link to the trace viewer. null when no trace URL is configured.
escalation.claimDurations number[] Claim duration options in minutes for the dashboard’s duration selectors. Set with LT_CLAIM_DURATION_OPTIONS (JSON array).
events.transport 'socketio' | 'nats' | 'none' Dashboard event transport. Defaults to socketio. Reports nats only when EVENT_TRANSPORT=nats is set and a NATS adapter is registered.
events.natsWsUrl string | null NATS WebSocket URL for browser connections, present when a NATS adapter is registered. Read from NATS_WS_URL.
events.reconnect.initialDelayMs number First delay before the dashboard retries a dropped event connection. Read from NATS_RECONNECT_INITIAL_MS (default 1000).
events.reconnect.maxDelayMs number Upper bound on the retry delay as it backs off. Read from NATS_RECONNECT_MAX_MS (default 60000).
events.reconnect.noticeAfterMs number How long the connection may stay down before the dashboard shows a notice. Read from NATS_LIVE_NOTICE_AFTER_MS (default 30000).
events.reconnect.spreadMs number Window that spreads the first retry after a drop, and the catch-up refetch after reconnecting, so tabs return gradually after a deploy. Read from NATS_RECONNECT_SPREAD_MS (default 5000).
auth.sso boolean Whether SSO is configured for embedded deployments. When true, the dashboard exchanges host auth for a Long Tail JWT instead of showing the login form.
auth.ssoLogoutUrl string | null Where the browser goes on logout. Set by the host with sso.logoutUrl in the startup config. When null, the dashboard shows its own login page on logout.
ai.enabled boolean Whether an LLM API key is configured. When false, the dashboard hides AI features (pipeline designer, AI assistant, triage).
branding.appName string Product name in the dashboard header. Set with branding.appName in the startup config; defaults to "LongTail".
GET /api/settings/custom.css

Returns the deployment’s registered design-system overrides (branding.customCss plus registered theme blocks) as text/css. The body is empty when nothing is registered.

The response carries an ETag. A request with a matching If-None-Match header returns 304.

Example request

Terminal window
curl -s https://lt.acme.dev/api/settings/custom.css

Response 200

:root { --lt-accent: #2563eb; }

Response 304: The CSS matches the If-None-Match ETag.

GET /api/nats-credentials

Returns the connection details the dashboard uses to subscribe to NATS events.

Auth: Requires authentication.

Example request

Terminal window
curl -s https://lt.acme.dev/api/nats-credentials \
-H "Authorization: Bearer $LT_TOKEN"

Response 200

{
"natsWsUrl": "wss://lt.acme.dev/nats?ticket=...",
"natsToken": null
}
Field Type Description
natsWsUrl string | null NATS WebSocket URL. Behind the WebSocket proxy, the URL carries a ticket query parameter for the caller, valid for NATS_WS_TICKET_TTL_SECONDS (default 300). null when no NATS adapter is registered.
natsToken string | null null behind the WebSocket proxy, since the proxy holds the NATS credential and the ticket allows subscribing only. For direct connections, NATS_DASHBOARD_TOKEN when set, else NATS_TOKEN.