API Integration

The API is the stable integration surface for Contour PLM and other tools.

OpenAPI

Open:

/api/openapi.json

The API page is:

/api

Versioned routes

Use /api/v1/* for integrations. Legacy /api/* routes remain available for the current UI and backward compatibility.

Important routes:

  • GET /api/v1/health
  • GET /api/v1/fluids
  • GET /api/v1/materials
  • GET /api/v1/materials/<material-id>
  • POST /api/v1/materials/bulk
  • GET /api/v1/materials/compare
  • GET /api/v1/material-standards
  • GET /api/v1/fluid-properties
  • POST /api/v1/fluid-properties/bulk
  • POST /api/v1/fluid-range/export
  • POST /api/v1/records/validate

Fluid point example

GET /api/v1/fluid-properties?fluid=methane&temperature=15&temperature_unit=Celsius&pressure=1&pressure_unit=Atm&backend=auto&output_unit_system=si

The response includes:

  • calculation_id
  • library_version
  • api_version
  • Backend selection and backend version where available
  • Source, validity, quality, and warnings
  • Raw SI and display unit metadata

Bulk material example

POST /api/v1/materials/bulk
{
  "material_ids": ["element-aluminum-pure", "element-iron-pure"],
  "units": "si"
}

Optional API token

Set:

PROPERTIES_LIBRARY_API_TOKEN=<token>

Then pass either:

Authorization: Bearer <token>

or:

X-API-Token: <token>

Token enforcement applies to /api/v1/* when the environment variable is configured.

Integration guidance

  • Use versioned endpoints for new integrations.
  • Use raw SI values for calculations.
  • Store calculation_id, library_version, and source-quality metadata with imported values.
  • Do not scrape HTML when an API route exists.