API
JSON endpoints for material lookup and fluid properties. Material, standard, and fluid responses include structured source, validity, and quality metadata.
/api/v1/* is the integration contract for Contour PLM and other tools. Legacy /api/* URLs remain available for the current UI.
| Endpoint | Contract |
|---|---|
GET /api/openapi.json | OpenAPI 3.0 document. |
GET /api/v1/fluid-properties | One state point with calculation_id, library_version, source quality, unit metadata, and backend version. |
GET /api/v1/fluid-properties-evidence.pdf | Evidence-pack PDF with inputs, outputs, formulas, source metadata, and warnings for one state point. |
POST /api/v1/fluid-properties/bulk | Calculate many state points in one request. |
GET /api/v1/fluid-saturation | Saturation pressure/temperature and optional quality-state properties for CoolProp-capable fluids. |
GET /api/v1/fluid-ph | Pressure-enthalpy state for CoolProp-capable refrigerants and fluids. |
POST /api/v1/fluid-range/export | Export a range table as JSON or CSV. |
POST /api/v1/materials/bulk | Retrieve material records by ID list, preserving request order. |
POST /api/v1/records/validate | Validate selected fluid, material, and standard records plus source metadata completeness. |
Optional API tokens are enabled by setting PROPERTIES_LIBRARY_API_TOKEN. When configured, pass Authorization: Bearer ... or X-API-Token for /api/v1/*.
GET /api/v1/fluid-properties?fluid=methane&temperature=15&temperature_unit=Celsius&pressure=1&pressure_unit=Atm&backend=auto&output_unit_system=si
{
"ok": true,
"calculation_id": "fluid_...",
"library_version": "1.0.2",
"backend": "CoolProp",
"backend_version": {"backend": "CoolProp", "version": "..."},
"source": {"family": "coolprop"},
"properties": {"density": {"value": 0.6798, "unit": "kg/m^3"}}
}
POST /api/v1/fluid-properties/bulk
{
"states": [
{"fluid": "methane", "temperature": 15, "temperature_unit": "Celsius", "pressure": 1, "pressure_unit": "Atm"},
{"fluid": "air", "temperature": 20, "temperature_unit": "Celsius", "pressure": 1, "pressure_unit": "Atm", "relative_humidity": 50}
],
"output_unit_system": "si"
}
POST /api/v1/materials/bulk
{"material_ids": ["nasa-6061-t6-die-forging-reference", "milhdbk-2024-t3-bare-sheet-0-25-6-3-mm"], "units": "si"}
| Endpoint | Purpose | Example |
|---|---|---|
GET /api/health |
App status and dependency check. | Open |
GET /api/materials |
Local static material records, including unit-converted properties, condition metadata, property type, source, validity, quality, source_metadata, and source_quality. Supports quality. |
Search steel |
GET /api/materials/compare |
Comparison table payload for candidate materials and selected properties, including count and missing-property reasons per cell. |
Compare example |
GET /api/materials/<id>/selected-properties |
Copy-ready JSON payload for selected material properties with condition and source metadata. | Selected properties |
GET /api/plm/material-property-payload |
PLM-shaped payload for copying selected material properties into Contour PLM metadata. | PLM payload |
GET /api/material-standards |
Lightweight purchasing and inspection standards linked to material records, including source, validity, quality, source_metadata, and source_quality. Supports the same quality filters as materials. |
Available standards No material standards in this edition. |
GET /api/fluids |
Retained common fluids plus added catalog fluid entries, each with source, validity, quality, source_metadata, and source_quality. Supports quality. |
Engineering estimates |
GET /api/fluids?all=1 |
Full backend fluid list when available. | Open |
GET /api/fluid-properties |
Fluid properties at a temperature and pressure. Supports backend=auto|coolprop|thermo|chemicals|cantera|local, Thermo/Chemicals phase=default|auto|gas|liquid and Thermo-only solid, output_unit_system=si or imperial, and returns source, validity, quality, and warnings. |
Phase example |
GET /api/fluid-saturation |
Saturation pressure/temperature and optional quality-state properties for CoolProp-capable fluids. | Water at 100 C |
GET /api/fluid-ph |
Pressure-enthalpy state for CoolProp-capable refrigerants and fluids. | R134a P-h |
GET /api/fluid-properties.pdf |
PDF report for one calculated state point. | Methane PDF |
GET /api/fluid-properties-evidence.pdf |
Evidence-pack PDF for one calculated state point, including inputs, outputs, formulas, source metadata, and warnings. | Evidence pack |
GET /api/fluid-range |
Temperature, pressure, or temperature/pressure range table for one selected property, including source and validity metadata. | Density range |
GET /api/fluid-range.pdf |
PDF report for the selected range, including chart and calculated table when rows are valid. | PDF report |
GET /api/fluid-range.csv |
CSV report for the selected range, including source quality and warnings. | CSV report |
Records expose source_metadata plus normalized source, validity, quality, backend_selection, and warnings fields so callers can distinguish reference backends, standard minimum values, supplier data, project correlations, and approximate estimates before using the data.
{
"source_family": "coolprop | thermo | chemicals | cantera | computational_dataset | experimental_screening_dataset | government_materials_handbook | government_materials_report | government_materials_specification | project_correlation | supplier_datasheet | standard_extract | local_estimate",
"source_citation": "Document or model reference",
"source_note": "Human-readable source/review note for reports and traceability",
"license_status": "open | internal | licensed_do_not_redistribute | unknown",
"valid_temperature_range": {"min": null, "max": null, "unit": "K", "note": ""},
"valid_pressure_range": {"min": null, "max": null, "unit": "Pa", "note": ""},
"valid_phase_or_condition": "Phase, temper, product form, or use condition",
"uncertainty": "Known limitation or expected accuracy",
"confidence_level": "reference_grade | supplier_grade | standard_minimum | engineering_estimate | unknown",
"last_reviewed": "YYYY-MM-DD",
"reviewer": "Person or script",
"review_status": "checked | pending | not_reviewed",
"review_checked": true,
"review_scope": "What was checked and under which use limits"
}
quality adds the rendered badge label, design_release_allowed flag, preliminary-sizing signal, and any required notice. Materials, material standards, fluids, and local models use the same quality object.
Fluid state is stored internally in K and Pa. Material properties are stored in SI engineering units. Converted responses keep raw SI metadata and display metadata side by side.
{
"dimension": "density",
"raw": {"value": 1.225, "unit": "kg/m^3", "unit_system": "si", "dimension": "density"},
"display": {"value": 0.0765, "unit": "lbm/ft^3", "unit_system": "imperial", "dimension": "density"}
}
Responses also include unit_contract. Fluid calculations include internal_state.temperature in K and internal_state.pressure in Pa.
/api/fluid-properties?fluid=Methane&temperature=15&temperature_unit=Celsius&pressure=1&pressure_unit=Atm&backend=auto&output_unit_system=si
/api/fluid-saturation?fluid=water&temperature=100&temperature_unit=Celsius&quality=0.5
/api/material-standards
/api/materials/compare?ids=nasa-6061-t6-die-forging-reference,milhdbk-2024-t3-bare-sheet-0-25-6-3-mm,element-aluminum-pure&properties=Density,Yield%20strength
/api/plm/material-property-payload?material=nasa-6061-t6-die-forging-reference&properties=Density,Yield%20strength
/api/fluid-properties.pdf?fluid=methane&temperature=15&temperature_unit=Celsius&pressure=1&pressure_unit=Atm&output_unit_system=si
/api/fluid-properties-evidence.pdf?fluid=methane&temperature=15&temperature_unit=Celsius&pressure=1&pressure_unit=Atm&output_unit_system=si
/api/fluid-range?fluid=methane&mode=temperature&property=density&temperature_min=0&temperature_max=100&temperature_steps=6&temperature_unit=Celsius&pressure=1&pressure_unit=Bar&output_unit_system=si
/api/fluid-range.pdf?fluid=methane&mode=temperature&property=density&temperature_min=0&temperature_max=100&temperature_steps=6&temperature_unit=Celsius&pressure=1&pressure_unit=Bar&output_unit_system=si
/api/fluid-range.csv?fluid=methane&mode=temperature&property=density&temperature_min=0&temperature_max=100&temperature_steps=6&temperature_unit=Celsius&pressure=1&pressure_unit=Bar&output_unit_system=si
Fluid property engine available: yes