IsoFind API
IsoFind exposes a local REST API served by FastAPI on http://127.0.0.1:8001. It is used by the Tauri frontend and can be queried directly by scripts or third-party tools to automate operations on analytical data. This page documents the 489 routes exposed by the backend.
General Information
All routes return JSON unless otherwise specified (CSV exports, PNG images, PDF files). Error responses follow the standard FastAPI format: {"detail": "error message"} with the corresponding HTTP status code. In multi-user mode, routes that modify data require a valid session cookie.
Interactive Swagger documentation is available at http://127.0.0.1:8001/docs while IsoFind is running. It lists every route with its complete data schema and allows direct testing.
Data Compartmentalization
Since version 1.1, most routes apply a visibility filter. A non-administrator user only sees the samples they own, those that have been shared with them, and those marked public. Child tables (geochemistry, molecules, physicochemistry, isotopes) inherit this filter implicitly, through the already restricted list of identifiers. Identifiers that are not visible but supplied by a client are silently dropped rather than raising an error, so that nothing is revealed about their existence.
Bulk destructive operations and global maintenance operations (global normalizations, purging of training data, resetting all normalizations) are restricted to administrators.
Contents
Sections
- System, Security and Startup
- Local Token and Third-party API Access
- Authentication and Sessions
- User Management
- Database Protection and Encryption
- Backup and Restore
- Samples
- Purification Yields
- Sample Import and Export
- Match Analysis
- Methods, Pipelines and Publications (v2)
- Standards and Isotopic Normalization
- Elements
- Certified Reference Materials
- Analyzed CRMs and Inter-standard Shifts
- GeoReM Integration
- Inorganic Geochemistry
- Physicochemistry
- Molecules: User Catalogue
- Molecules: Measurements and Compliance
- Molecules: Reference Database
- Isotope and Pollutant Links
- CSIA: Compound-Specific Isotope Analysis
- Isotopic Fractionations
- Kinetic Fractionation
- Nexus: Health, Sessions and Workflows
- Nexus: Isotopic Computation and Hybrid Pipeline
- Nexus: Speciation and Machine Learning
- Nexus: Quick Detection and Provenance
- Molecular Nexus
- Prediction and Simulation
- Signature Reconstruction (IsoSupply)
- Reports
- ISOF Format
- Community Database
- Archives
- Projects
- Mapping
- Generic Workflows
- Licence
- Interface Pages
System, Security and Startup
ready=false.
single_user or multi_user.
standard or airgap. The frontend uses it to disable network-dependent features.
config.json.
Body: {"language": "fr"|"en"}
Local Token and Third-party API Access
api_access mode: open, manual confirmation, or refusal.
api_access mode. Called from the IsoFind preferences.
isofind_token cookie, mirroring the security token. Required for navigations triggered by an <a href> tag.
Authentication and Sessions
Body: {"username": str, "password": str}
Returns: {"success": bool, "user": {...}} and a session cookie. In single-user mode, always accepted.
Body: {"old_password": str, "new_password": str, "confirm_password": str}
Body: {"recovery_code": str, "new_password": str}. Single use.
User Management
Body: username, email, password, role (user, analyst, manager, admin), display_name.
failed_attempts and locked_until.
Database Protection and Encryption
encrypted level: creates the keystore with a random MEK and generates a BIP39 recovery key.
/api/auth/change-password, which concerns the user password.
fractionation_database, isotopes_reference, molecules_reference.
.db file, verifies its ECDSA signature from the IsoFind Issuing CA, then installs it.
Backup and Restore
backups/.
Body: {"password": "master_password"}
.protected.bak backup. Decryption happens in memory server-side: the plaintext never transits.
Samples
Params: limit (int), sort (asc or desc, by creation date). Default: descending identifier.
Body: name (required), material_type, sector, collection_date, collection_location, description, classification (source or daughter), latitude, longitude, project.
Material type and classification are normalized automatically. In multi-user mode, owner_id is the current user and visibility defaults to private.
isotope_data rows with the detail of ratio_value against normalized_value. Diagnostic use.
Params: limit (int).
sample_id, mergeable client-side.
collection_date, sample_type and standard_used.
Purification Yields
Body: {"element": str, "yield_percent": float, "operator": str|null, "method_key": str|null}
Uses INSERT OR REPLACE: a single yield per (sample_id, element) pair.
protocol_json of purification or separation methods.
Params: element (str).
Sample Import and Export
Body: multipart/form-data: file, archive_mode (bool), standard_aliases, skip_existing.
Accepts headers in French or English, with or without accents, in upper or lower case. Resolution is exact first, then approximate (maximum edit distance of 2). Encoding is detected automatically (UTF-8, UTF-8 BOM, Latin-1).
Body: [sample_id, ...]
Match Analysis
Body:
| Field | Type | Default | Description |
|---|---|---|---|
sample_id | int | required | Identifier of the sample in the database. |
isotope_data | list | [] | Isotopic data to use. If empty, the database values are taken. |
threshold | float | 0.85 | Match score threshold, between 0 and 1. Mahalanobis distance. |
algorithm | str | hybrid | hybrid, mahalanobis or bayesian. |
classification_filter | str | sources | sources, daughters or all. |
database_sources | list | ["local"] | local, archive, community. |
same_material | bool | true | Restrict to identical material types. |
Body: sample_name, material_type, isotope_data (required), threshold (default 0.75), algorithm.
/analyze that searches archives only. Same parameters.
/analyze/manual restricted to visible archives.
Params: threshold (float).
sample_id to result, with errors isolated per sample.
Params: algorithm, threshold, sigma_multiplier.
Methods, Pipelines and Publications (v2)
Params: type, element.
Body: {"sample_ids": [...]}
Body: sample_ids, method_id, method_type, method_name, element, parameters_json.
Params: year, category.
Params: element.
Params: current_stage, status.
Standards and Isotopic Normalization
Params: element.
Elements
Certified Reference Materials
Params: strategy: merge strategy on duplicates.
Analyzed CRMs and Inter-standard Shifts
Format: crm_id, crm_name, session_name, analysis_date, instrument, standard_used, element, isotope_ratio, measured_value, uncertainty
Params: element (required), isotope_ratio (required).
Params: element, isotope_ratio, standard_from, standard_to.
Params: value, element, isotope_ratio, standard_from, standard_to.
Params: limit (int).
GeoReM Integration
Params: q: material name.
Params: user_notes.
Params: material_name.
Example: /api/georem/search-isotopes?material_name=GXR-4
Inorganic Geochemistry
remplacer=true first deletes the elements concerned, which allows a CSV import to be replayed cleanly.
Physicochemistry
GeochemicalConditions object).
UNIQUE(sample_id, parameter) constraint guarantees a single value per parameter.
Molecules: User Catalogue
Params: famille (exact filter, for example PFAS), actif, page, page_size, include_geochemical, q (free-text search).
Params: archiver (bool): archives instead of deleting.
Molecules: Measurements and Compliance
Params: page, page_size, include_geochemical, famille, sample_ids.
conforme, seuil_ref and seuil_ref_unit for every measurement whose catalogued molecule had its threshold changed.
Molecules: Reference Database
Params: famille (PFAS, Pesticides, PAH...), niveau_acces (gratuit, pro, defense), q, limit.
Isotope and Pollutant Links
isotope_data.
Params: famille, element.
Params: famille, element, faisabilite, min_discrimination. Falls back to static data if the table is empty.
ref_molecules_isotopes_v2.
CSIA: Compound-Specific Isotope Analysis
Isotopic Fractionations
Params: page, per_page, element, process_type, material, search, sort_by, sort_order.
Params: element, process_type.
Kinetic Fractionation
equilibrium_reached = 0) are searched first, with a fallback on unspecified data.
Params: element, process_type, mineral.
Nexus: Health, Sessions and Workflows
__autosave__ slot.
Nexus: Isotopic Computation and Hybrid Pipeline
forward and inverse modes.
/api/nexus/predict_speciation.
delta_source to estimate the residual fraction.
Nexus: Speciation and Machine Learning
Params: file, element.
Nexus: Quick Detection and Provenance
Params: q, element, material_type, limit.
Params: element.
archive_samples and archive_isotope_data.
Params: sample_id, element, isotope_ratio.
Molecular Nexus
delta_0 = delta_residue - epsilon * ln(f). Uncertainty is propagated at each step upstream.
f = exp((delta_sample - delta_source) / epsilon), degradation being (1 - f) * 100.
Params: process_type.
sample_geochem for a sample.
Prediction and Simulation
residual = observed - prior) for an element.
Params: element.
Params: molecule.
Params: molecule, pathway, primary, secondary.
Signature Reconstruction (IsoSupply)
Params: method: analytical (default, instantaneous and scientifically defensible) or stochastic methods.
Params: element (required), q (name fragment, case-insensitive).
isofind.db holding measurements for the requested element.
Params: element, limit.
Params: element, limit.
process_id values resolved.
workflows.db.
updated_at.
Params: element, limit.
Reports
sample_ids list is filtered down to the visible samples.
Params: label_id, project.
Params: matrix_a, matrix_b.
ISOF Format
.isof file. Only the visible samples are exported.
.isof file. Samples in the file are treated read-only: nothing is inserted into samples.
.isof file at level 2 (ECDSA and the IsoFind PKI).
Body: multipart: file, lab_key_pem, lab_cert_pem, use_stored_cert, scope, signed_by.
found=false without error if none is stored.
If use_stored_key=true, the key is read from the existing store: the post-CSR case, where the key was already generated.
Community Database
Params: query, location. Requires network access, blocked in air-gap mode.
Path: action is archive, unarchive or delete.
Archives
Params: page (default 1), page_size (default 50), search, element, classification, sector, project.
Projects
.isf file.
Params: supprimer_donnees (bool): also deletes the associated samples. Irreversible.
Params: project_only (bool): restricts the computation to the samples associated with the project.
.isf format.
.isf file.
.isf file.
Mapping
y_tms = (2^z - 1) - y_xyz.
maxZoom to the installed pack.
Params: sample_ids (comma-separated list), mode (isotope, geochem, physico, molecule), element, ratio, parameter (default pH).
Params: threshold, filename.
Generic Workflows
Licence
/api/license/status variant exists for English-speaking clients.
Interface Pages
ProtectedTemplates.