v0.1 (beta)

API

Turbines & configs

CRUD for turbine configurations.

Endpoints for managing the turbine inventory in your org. All require an authenticated request (Bearer JWT or API key). Verified-account-only endpoints are flagged below — demo accounts receive 403 if they hit them.

List + read

GET /turbines

Paginated list of every turbine config in the caller's org. Query params: page (default 1), page_size (default 20).

GET /turbines/{id}

Detail view including the parsed scalar parameters (rated power, rotor diameter, hub height, wind-speed band, tilt, precone, rotor speed) plus the blade_config, tower_config, nacelle_config, controller_config JSON blobs when populated.

GET /turbines/{id}/detailed-properties

Reads the actual OpenFAST input files from object storage and returns parsed blade stations (BlSpn / BlChord / BlTwist), tower stations (HtFract / TMassDen / stiffness), airfoil polars, and controller params. Used by the View dialog and by the 3D viewer to loft real blade geometry.

GET /turbines/{id}/airfoil-polar/{airfoil_index}

Cl / Cd / Cm vs alpha for a single airfoil in the turbine's airfoil set. Used by the View dialog's polar viewer.

GET /turbines/{id}/fst-defaults

Returns the default values written to the turbine's main .fst file for every parameter exposed in the Advanced Settings panel. The frontend uses this to populate placeholder text on Run Analysis.

Demos

GET /turbines/demos

Lists the bundled reference turbines. The backend auto-discovers every *.zip in DemoFiles/Turbines/ and merges friendly metadata (name, description, type, headline specs) from the colocated manifest.json. Zips without a manifest entry still appear with a filename-derived label.

Currently returns five entries: NREL-5MW-Land, IEA-15-240-RWT-Onshore, IEA-15-240-RWT-Monopile, IEA-15-240-RWT-UMaineSemi, IEA-22-280-RWT-Onshore. The Library page ensures all five are loaded into your org on first visit.

POST /turbines/demos/{demo_id}/load

Idempotent — provisions a turbine config for the named demo on first call, returns the existing row on subsequent calls. The response's reused flag tells you which path you hit. The created row has a description starting with “Pre-built demo:” and is treated as read-only for edits + deletes (see below).

Create + clone (verified accounts only)

POST /turbines

Create a config from a Build-from-scratch payload (geometry, blade / tower / nacelle / controller blobs). 403 for unverified accounts.

POST /turbines/from-upload

Upload a ZIP of OpenFAST inputs (multipart). The server extracts into a per-config storage path, auto-detects the main .fst, fixes ROSCO DLL paths, parses scalar params, and creates a config row. 403 for unverified accounts.

POST /turbines/{id}/clone

Clones a config (typically a demo) into an editable copy. The backend copies the source tree to a fresh storage key, drops the “Pre-built demo:” description prefix, and names the clone {original} (copy)” (auto-incrementing if that name is already taken). 403 for unverified accounts.

Update + delete

PUT /turbines/{id}

Update geometry / wind-speed band / parameter blobs. Returns 403 when the target row is demo-derived (its description starts with the demo prefix). The Library hides the Edit pencil on demo cards client-side, but the server enforces regardless. Resets is_validated to false so the next job submission re-runs validation.

DELETE /turbines/{id}

Delete a config. Returns 403on demo-derived rows (clone first if you no longer want this demo's clone but want a fresh load_demo). Returns 409 when an active job still references the config.

Related