Overview
The minimal-trace export gives org admins a graph of how discussion patterns connect across sessions, for analysis outside Kair Voice (for example Gephi or a spreadsheet). It carries structure and short labels: ids, types, counts, scores, enums, timestamps, session dates, topic labels, entity names, tags and strand titles. Audio, transcript text and free-text prose are never included. Entity names, tags and strand titles are exported as stored, without redaction: a full export is a full export. It is not a GDPR export. Data subject exports are described in Data Subject Requests. For how the four exports differ by organisation kind, see Exports. No new tables. The export is read-only and is built on request.Endpoint
The UI handles the 403 for a stale sign-in with its step-up modal and retries.
The route is a
POST so the request is captured by the audit_events middleware. No per-route audit logging is added.
What it contains
Every session in the organisation’s workspaces that is not soft-deleted becomes a node, whether or not it has a discourse analysis.
Edges:
Ids are stable and typed:
session:<uuid>, card:<session uuid>:<card key>, divergence:<session uuid>:<index>, convergence:<session uuid>:<index>, entity:<key>, tag:<key>, strand:<uuid>. Card keys are the normalised card name, as elsewhere in the app.
Inclusion rules:
- Analysis: the newest
moderator_insightsrow per session, as the session’s discourse-insight endpoint serves it. A row that no longer deserialises is skipped and logged by session id only. - Strands: only
activeandprovisionalstrands of the organisation.dismissed,mergedandexpiredare dropped. - Strand relations: only
acceptedones, with both ends in the export. - Entities, tags, divergences and convergences only appear when their card or session is in the export.
What is excluded
The output is built field by field from explicit types. A new source column cannot reach the export unless it is added to the builder.- Audio, transcripts, segments and every excerpt or quote
- Free text: card source context, frame, open question, intention, item text, objections, divergence summaries and positions, convergence summaries, consensus caveats, analysis headline, intervention reason, strand statements and reasons, entity descriptions, practice outputs
- Speaker and device labels. Counts are emitted instead (
speaker_count,positions_count) - User, actor and API-key ids
- Session titles, metadata and file names
- Email addresses
metadata.excluded lists these categories in the export itself.
Archive layout
JSON: one pretty-printed document withmetadata, nodes and edges.
CSV: a zip containing:
nodes.csv:Id,Label,node_type,session_id,workspace_id,propertiesedges.csv:Source,Target,edge_type,Weight,propertiesmetadata.json:export_version(1),profile(minimal_trace),organisation_id,exported_at,node_countsandedge_countsper type,excluded
Id, Label, Source, Target, Weight). properties is compact JSON.
CSV cells are RFC 4180 quoted. A cell whose first non-space character is =, +, -, @, tab or CR is prefixed with a single quote, so spreadsheets show it as text rather than running a formula.
Access
- Org admin of the target organisation, or platform admin (
require_org_admin). - Session auth only. API keys and OAuth/MCP tokens are rejected.
- Fresh sign-in, at most 10 minutes old (
require_fresh_auth). - Only team organisations. Personal organisations return 403.
Audit
audit_events: the request is recorded automatically as a write (actor, method, path, status, hashed IP). No content is written.audit_trail: nothing is written, because no rows change.- Tables touched: none. No triggers, migrations or new columns.
Implementation
- Pure builder and CSV writer:
api/crates/core/src/minimal_trace.rs(unit tests cover exclusions, the session date label, shared entities, divergence matching, strand filtering, CSV escaping and the formula guard). - Loader and route:
api/crates/api/src/routes/organisation/organisation_routes_export.rs, mounted fromorganisation/mod.rs. - The loader runs one query per table, batched with
is_inover session and strand ids. It does not query per session.