Skip to content

Explorer API Reference

All server-side API endpoints available in the jinflow Explorer.

These are internal Explorer APIs, not a public REST API. They serve the Explorer web UI. Documented here for transparency and for teams building integrations.


Health check with DB connectivity status.

ParameterInRequiredTypeDescription
(none)

Response: { status, mode?, db?, sizeMb?, tenants?, downloading?, errors?, initialized? } — shape varies by mode. Returns status: "ok" with DB info in local mode, or KLS store stats in R2 mode. HTTP 503 with status: "error" on failure.


Git identity (name/email) for the current user, optionally scoped to a tenant.

ParameterInRequiredTypeDescription
tenantquerynostringTenant slug to scope identity lookup

Response: { name, email } from git config.


KLS store download progress. Only meaningful in R2 mode.

ParameterInRequiredTypeDescription
(none)

Response: { active: false } when not in KLS store mode. Otherwise { active, initialized, ready, downloading, error, tenants[] } where each tenant entry has compositeId, tenantId, displayName, pack, sizeMb, status, hasSis.


Lightweight mtime/generation poll for the DbWatcher component. No DuckDB query — just a stat() call.

ParameterInRequiredTypeDescription
tenantpathyesstringComposite tenant ID (e.g. millesime.domaine_zufferey)

Response: { generation, mtime, sizeMb? }mtime is ISO timestamp of KLS file, generation is an in-memory counter incremented on DB swap.


Global search across all content types. Supports three modes: tenants (list all tenants), summary (finding severity counts), and search (full-text search across signals, theses, taxonomies, entities, SMEbits, BitBundles, people, dimensions, and glossary).

ParameterInRequiredTypeDescription
modequerynostringsearch (default), tenants, or summary
tenantqueryyes*stringTenant slug (required for search and summary)
qqueryyes*stringSearch query, min 1 char (required for search)

Response (search): { probes[], hypotheses[], taxonomies[], entities[], smebits[], bitbundles[], people[], dimensions[], glossary[] } — each array contains matching items with tri-lingual names and metadata.

Response (tenants): { tenants[{ id, name, source }] }

Response (summary): { summary: { total, high, medium, low, money } }


Tenant logo image. Tries DB-stored logo first, falls back to filesystem. Cached 24 hours.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug or composite ID

Response: Binary image (PNG, SVG, JPEG, or WebP) with appropriate Content-Type. HTTP 404 if no logo found.


Pipeline DAG artifact from the KLS.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
artifact_keypathyesstringgraph_json or graph_html

Response: JSON (for graph_json) or HTML (for graph_html) pipeline graph. Cached 1 hour. HTTP 404 if not found.


PDF report blob from the KLS report_pdfs table.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
report_keypathyesstringReport identifier (lowercase alphanumeric + underscores)

Response: application/pdf binary with inline Content-Disposition. Cached 1 hour. HTTP 404 if not found.


Level 2 lineage: source Gold records that contributed to a finding. Queries Gold tables based on entity type and returns matching rows grouped by source table.

ParameterInRequiredTypeDescription
tenantqueryyesstringTenant slug
entity_typequerynostringEntity type (Material, Case, BillingEvent, CostCentre)
entity_idqueryyesstringEntity identifier
time_bucketquerynostringMonth filter (e.g. 2024-03)

Response: { entity_type, entity_id, time_bucket, groups[] } where each group has { table, label, count, rows[] }. Rows are raw Gold records (up to 20 per group).


Level 1+2 lineage: finding metadata plus source Gold records. Looks up the finding by ID, then calls the explainer to resolve source records.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
finding_idpathyesstringFinding identifier

Response: { explanation } containing finding metadata and source record groups. HTTP 404 if finding not found.


Level 4 lineage: AI-generated natural-language explanation via Claude API. Enriches the finding with entity attributes and signal metadata before generating.

ParameterInRequiredTypeDescription
tenantbodyyesstringTenant slug
findingbodyyesobjectFinding object (probe_id, entity_type, entity_id, time_bucket, severity, money_at_risk, evidence)
localebodynostringen (default), de, or fr

Response: { narrative, model } — narrative is a 3-4 sentence explanation, model is the Claude model used. HTTP 503 if ANTHROPIC_API_KEY is not set. HTTP 502 on API errors.


Compare KLS build commit against GitHub remote HEAD. Reads _jinflow_snapshot and _jinflow_afs_remote from the KLS, then calls the GitHub Compare API. Cached 5 minutes per tenant.

ParameterInRequiredTypeDescription
tenantqueryyesstringTenant slug

Response: { status, ahead_by?, build_commit?, remote_head?, commits[]?, files[]? } where status is in_sync, behind, no_build_info, no_remote, repo_not_found, api_error, or fetch_error. Commits include sha, author, date, message. Files include filename and status.


Invalidate cached R2 files and trigger re-download. Only active in KLS store mode. Also accepts GET for convenience.

ParameterInRequiredTypeDescription
scopebody/querynostringall (default), pack, or tenant
packbody/querynostringPack name (when scope=pack)
tenantbody/querynostringTenant ID (when scope=tenant)

Response: { status, scope, pack?, tenant?, invalidated, tenants, ready } — counts of invalidated and re-downloaded entries. Returns { status: "skipped", reason } when not in KLS store mode.


List saved views, optionally filtered by entity.

ParameterInRequiredTypeDescription
tenantqueryyesstringTenant slug
entityquerynostringEntity/dimension key to filter by

Response: { views[] } — array of saved view objects.


Create a new saved view.

ParameterInRequiredTypeDescription
tenantbodyyesstringTenant slug
entitybodyyesstringEntity/dimension key
namebodyyesstringView display name
paramsbodyyesobjectView parameters (filters, sort, etc.)
authorbodynostringAuthor name

Response: { view } — the created view object.


Update an existing saved view.

ParameterInRequiredTypeDescription
tenantbodyyesstringTenant slug
view_idbodyyesstringView identifier
namebodynostringUpdated name
paramsbodynoobjectUpdated parameters

Response: { ok } — boolean success flag.


Delete a saved view.

ParameterInRequiredTypeDescription
tenantqueryyesstringTenant slug
view_idqueryyesstringView identifier

Response: { ok } — boolean success flag.


List all signal, perspective, thesis, and verdict definitions available in the AFS.

ParameterInRequiredTypeDescription
tenantqueryyesstringTenant slug

Response: { probes[{ probe_id, type, description, contract }] }


Load YAML source for a single signal/perspective/thesis/verdict.

ParameterInRequiredTypeDescription
tenantqueryyesstringTenant slug
probe_idqueryyesstringSignal identifier (must match ^(probe_|assessment_|hyp_|diag_)[a-z][a-z0-9_]*$)

Response: { probe_id, yaml } — raw YAML source string. HTTP 404 if not found.


Write signal YAML to the AFS signals directory.

ParameterInRequiredTypeDescription
probe_idbodyyesstringSignal identifier (must start with probe_)
yamlbodyyesstringYAML content
forcequerynobooleantrue to overwrite existing file (default: false)

Response: { saved, path? } on success. HTTP 409 if file exists and force is not set. HTTP 400 on invalid probe_id.


Validate signal YAML against contracts. Writes YAML to a temp file and runs signalcheck.py.

ParameterInRequiredTypeDescription
yamlbodyyesstringYAML content to validate

Response: { valid, errors[] }valid is boolean, errors is an array of error messages (empty when valid).


Compile signal YAML to SQL. Pipes YAML into probecompile_single.py via stdin.

ParameterInRequiredTypeDescription
yamlbodyyesstringYAML content to compile

Response: { ok, sql? } on success, { ok: false, errors[] } on failure.


Get the tenant notebook. Auto-creates an empty notebook if none exists.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug

Response: { notebook: { tenant_id, cells, created_at, updated_at } }cells is a JSON string of cell array.


Add a cell to the tenant notebook.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
cellbodyyesobjectCell object with type (one of: narrative, view, reference, discussion, action) and type-specific fields
authorbodynostringAuthor name

Response: { notebook } — updated notebook. HTTP 201 on success.


PUT /[tenant]/api/notebook/cells/[cell_id]

Section titled “PUT /[tenant]/api/notebook/cells/[cell_id]”

Update an existing cell in the tenant notebook.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
cell_idpathyesstringCell identifier
updatesbodyyesobjectFields to update
authorbodynostringAuthor name

Response: { notebook } — updated notebook. HTTP 404 if cell not found.


DELETE /[tenant]/api/notebook/cells/[cell_id]

Section titled “DELETE /[tenant]/api/notebook/cells/[cell_id]”

Delete a cell from the tenant notebook.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
cell_idpathyesstringCell identifier

Response: { notebook } — updated notebook. HTTP 404 if cell not found.


POST /[tenant]/api/notebook/cells/[cell_id]/discussion

Section titled “POST /[tenant]/api/notebook/cells/[cell_id]/discussion”

Add a reply to a discussion cell.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
cell_idpathyesstringDiscussion cell identifier
authorbodyyesstringReply author name
textbodyyesobjectReply text with en/de/fr keys
datebodynostringISO date (defaults to today)

Response: { notebook } — updated notebook. HTTP 201 on success. HTTP 404 if discussion cell not found.


List all notes for a tenant.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug

Response: { notes[] } — array of note summary objects.


Create a new note.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
titlebodyyesstringNote title
tagsbodynostring[]Optional tags

Response: { note } — the created note object. Author is auto-resolved from git identity.


Get a single note by ID.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
note_idpathyesstringNote identifier

Response: { note } — full note object with cells. HTTP 404 if not found.


Add a cell or discussion reply to a note.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
note_idpathyesstringNote identifier
cellbodynoobjectCell to add (if adding a cell)
replybodynoobjectReply object with text (if adding a discussion reply)
cell_idbodynostringTarget cell for reply (required with reply)

Response: { cell_id } when adding a cell, { ok } when adding a reply. Provide either cell or reply+cell_id.


Update a note’s metadata or a cell within a note.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
note_idpathyesstringNote identifier
cell_idbodynostringCell to update (if updating a cell)
updatesbodynoobjectCell field updates (required with cell_id)
(other)bodynoobjectNote metadata fields (if no cell_id)

Response: { ok } — boolean success flag.


Delete a note or a cell within a note.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
note_idpathyesstringNote identifier
cell_idquerynostringIf provided, deletes this cell instead of the entire note

Response: { ok } — boolean success flag.


GET /[tenant]/taxonomies/[taxonomy_id]/members

Section titled “GET /[tenant]/taxonomies/[taxonomy_id]/members”

List or search taxonomy members.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
taxonomy_idpathyesstringTaxonomy identifier
node_idquerynostringFilter members by taxonomy node
qquerynostringFull-text search across members (overrides node_id)

Response: Array of member objects.


GET /[tenant]/taxonomies/cardinality/member

Section titled “GET /[tenant]/taxonomies/cardinality/member”

Cross-taxonomy mappings for a single member.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
idqueryyesstringMember identifier

Response: Array of mapping objects showing which taxonomy nodes the member belongs to.


GET /[tenant]/taxonomies/cardinality/members

Section titled “GET /[tenant]/taxonomies/cardinality/members”

Members shared between two taxonomy nodes.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
aqueryyesstringFirst taxonomy ID
bqueryyesstringSecond taxonomy ID
nodeAquerynostringNode filter in first taxonomy
nodeBquerynostringNode filter in second taxonomy
dimquerynostringDimension type filter

Response: Array of shared member objects.


GET /[tenant]/taxonomies/cardinality/fanout

Section titled “GET /[tenant]/taxonomies/cardinality/fanout”

Fanout distribution between two taxonomies (how many nodes in B each node in A maps to).

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
aqueryyesstringFirst taxonomy ID
bqueryyesstringSecond taxonomy ID
dimquerynostringDimension type filter

Response: Distribution object with fanout statistics.


GET /[tenant]/taxonomies/cardinality/detail

Section titled “GET /[tenant]/taxonomies/cardinality/detail”

Cardinality metrics between two taxonomies.

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
aqueryyesstringFirst taxonomy ID
bqueryyesstringSecond taxonomy ID
dimquerynostringDimension type filter

Response: Detail object with cardinality metrics (counts, ratios).


CSV export of a dimension table (up to 1M rows).

ParameterInRequiredTypeDescription
tenantpathyesstringTenant slug
entitypathyesstringDimension/entity key
qquerynostringSearch filter
sortquerynostringColumn to sort by
orderquerynostringasc (default) or desc
f.*querynostringColumn filters (e.g. f.is_active=true)

Response: text/csv file download with Content-Disposition: attachment.

jazzisnow jinflow is a jazzisnow product
v0.45.1 · built 2026-04-17 08:14 UTC