Skip to content

How to call the API

There are multiple ways to interact with the Renewables.Architect Integrate API.

A typical workflow involved interacting directly with the Analysis Service and is described below.


  1. Authenticate with the API to obtain an access token.

  2. Queue your analysis by sending a Renewables.Architect application definition file (app.json).

    You can get application definition payloads in the Applications Library - copy and place them in a new file with a .json extension somewhere on your computer.

    When queuing your analysis you receive an analysis ID, with which you can then trace progress and results.

    terminal
    curl --request POST https://ra.dnv.com/api/analysis/analyses \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer YOUR_TOKEN_HERE" \
    --silent --show-error \
    -d "@{PATH_TO_APP_HERE}"
  3. Check analysis progress and logs. To check on the state of your analysis, use the following command and the analysis ID you received after queuing.

    terminal
    curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/state \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer YOUR_TOKEN_HERE" \
    --silent --show-error
  4. Get summary and detailed results. The overview results for an entire analysis can be obtained with the following commands. More detailed results for every individual run can be accessed as well, corresponding commands are listed below

    terminal
    curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/runs/results \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer YOUR_TOKEN_HERE" \
    --silent --show-error
  5. Terminate/cancel a running analysis if required. Cancelling an analysis will allow running runs to finish, whereas terminating stops all runs immediately.

    terminal (cancel)
    curl --request PUT https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/state \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer YOUR_TOKEN_HERE" \
    --silent --show-error \
    --data '{"state": "Cancelled"}'
    terminal (terminate)
    curl --request PUT https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/state \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer YOUR_TOKEN_HERE" \
    --silent --show-error \
    --data '{"state": "Terminated"}'
  6. Delete analysis data when no longer needed (optional).

    terminal
    curl --request DELETE https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer YOUR_TOKEN_HERE" \
    --silent --show-error

Get overview over analyses / Retrieve analysis IDs

Section titled “Get overview over analyses / Retrieve analysis IDs”

To get an overview over all analyses listed with your user, please use the following. The received analysis ID(s) will then allow you to follow the steps 3 to 6 above, additional information about the analysis state and submit time allows identification.

terminal
curl --request GET https://ra.dnv.com/api/analysis/analyses \
--header "Content-Type: application/json" \
--header "Authorization: Bearer YOUR_TOKEN_HERE" \
--silent --show-error

In order to look into an analysis in more detail, it is often helpful to investigate the individual runs. To access them, their run IDs are required, which can be obtained with the following command.

terminal
curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/runs \
--header "Content-Type: application/json" \
--header "Authorization: Bearer YOUR_TOKEN_HERE" \
--silent --show-error

To not only obtain the run IDs, but also the corresponding state of the run, please use the following.

terminal
curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/runs/state \
--header "Content-Type: application/json" \
--header "Authorization: Bearer YOUR_TOKEN_HERE" \
--silent --show-error

In order to understand why a run has failed, or what has happened during the modelling, the run logs can provide useful insight. Use the run ID obtained with one of the methods above.

terminal
curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/runs/YOUR_RUN_ID_HERE/logs \
--header "Content-Type: application/json" \
--header "Authorization: Bearer YOUR_TOKEN_HERE" \
--silent --show-error

Results for an individual run can be retrieved using the following commands.

terminal
curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/runs/YOUR_RUN_ID_HERE/results \
--header "Content-Type: application/json" \
--header "Authorization: Bearer YOUR_TOKEN_HERE" \
--silent --show-error

Figures for an individual run can be retrieved using the following commands.

terminal
curl --request GET https://ra.dnv.com/api/analysis/analyses/YOUR_ANALYSIS_ID_HERE/runs/YOUR_RUN_ID_HERE/figures \
--header "Content-Type: application/json" \
--header "Authorization: Bearer YOUR_TOKEN_HERE" \
--silent --show-error
Actioncurl command
Queue analysisPOST https://todo-api-url.dnv.com/analyses
Analysis overviewGET https://todo-api-url.dnv.com/analyses
Analysis stateGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/state
Analysis resultsGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/runs/results
Cancel analysisPUT https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/state data state: Cancelled
Terminate analysisPUT https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/state data state: Terminated
Delete analysisDELETE https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE
Get run IDsGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/runs
Get run statesGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/runs/state
Get run logsGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/runs/YOUR_RUN_ID_HERE/logs
Get run resultsGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/runs/YOUR_RUN_ID_HERE/results
Get run figuresGET https://todo-api-url.dnv.com/analyses/YOUR_ANALYSIS_ID_HERE/runs/YOUR_RUN_ID_HERE/figures