Public links and export
A finished dashboard can be opened publicly via a link — no FileDB account required on the visitor's side.
Creating and revoking
POST /api/dashboards/share creates a link (requires write role and access to the dashboard's DB); dashboard_id must reference a real, existing dashboard — the DB used for sharing comes from that dashboard's own record, not from a separate field in the request, so a link can't be pointed at a different database than the one it belongs to. A link carries a 192-bit random token, an optional password (stored as a PBKDF2 hash, checked constant-time — response timing can't distinguish "wrong password" from "unknown token" from "expired link"), an optional TTL (zero means the link never expires), and an allow_download flag that permits export.
curl -X POST $URL/api/dashboards/share -H "X-Token: $TOK" -d '{
"dashboard_id": "dsh_a1b2c3",
"password": "optional",
"ttl_seconds": 604800,
"allow_download": true
}'
POST /api/dashboards/share/revoke disables a link immediately; there's no separate long-lived session for a public visitor — every request re-validates the token and password, so revocation doesn't need to invalidate anything else.
Viewing via the link
POST /api/dashboards/share/validate (public, rate-limited) checks the token/password and returns metadata only — no SQL, no DB schema. POST /api/dashboards/share/query renders the dashboard's saved widgets with the same code path as the authenticated view, returning {dashboard_name, widgets: [...]}, where each item is an already-computed result (id, type, title, data, error) — the shape itself has no room for SQL text or table structure. Global filters work the same way on the public path as the authenticated one, with the same limitation — structured-source widgets only.
CSV export
POST /api/dashboards/share/export is public, and only works if the link's allow_download is enabled. It re-renders one specific table widget (widget_id) and streams it back as CSV; chart widgets (line/bar/pie/kpi) have nothing to export — there are no row-level data to download.