Quickstart
This quickstart uses the current DalyAPI auth flow:- Exchange workspace + user API keys for a JWT.
- Use the JWT in
Authorization: Bearer ...for protected routes. - Run an energy model sync (default) or async (
?async=true) and track status.
1. Set Your API Base URL
Use your deployed API host. In local development, the default is:2. Exchange API Keys for a JWT
CallPOST /auth/token with your workspace and user API keys.
3. Call Protected Endpoints
4. Run an Energy Model (Sync Default)
By default,POST /energymodels runs synchronously. Use ?async=true when you want queued background execution.
Current output-shaping controls live in the request body under output:
output.timeSeries=trueadds plant-leveltimeSeriesdata to sync completed responses.output.blockResults=trueadds block-levelblockTimeSeriesdata.output.blockIndexfilters the returnedblockTimeSeriesmap to one zero-based block but does not reduce execution scope.output.lossBreakdownTimestamps=trueimplies block-level results and nests timestamped loss detail underblockTimeSeries[<blockIndex>].lossBreakdown.output.fullTimeSeries=truecannot be combined withoutput.blockResults=true.
output flags explicitly on
the request body and inspect timeSeries and blockTimeSeries in the completed
response. blockTimeSeries keys preserve the original zero-based block numbering,
including filtered single-block responses.
Each returned block result already represents the full configured
numberOfInverters count for that block type, not a single inverter.
5. Poll Task Status
Task lifecycle is
pending -> queued -> running -> completed|failed|cancelled.6. Edit and Rerun a Saved Model In Place
Imported project variants fromPOST /projects/import and previously created
energy models both use the same saved-row workflow:
GET /energymodels/{id}?include=inputs- edit the returned saved input JSON
PUT /energymodels/{id}POST /energymodels/{id}/run
56; it does not create a second row.
7. Response Contracts
For full sync-complete vs queued200 envelopes, taskDetails fields, and include-token behavior, see:
