SolarFarmer's Web API
Note
This section of the documentation refers to the SolarFarmer web API (Application Programming Interface) that is available so you can write your own scripts to run the energy calculation in the cloud without the need for the desktop application.
If you just want to run your energy calculations in the cloud directly from the desktop application then you don't need to read this section of the documentation (though obviously feel free if you are interested!)
If you're looking for information on automation (running C# scripts within the SolarFarmer desktop application) then jump to Automation in SolarFarmer.
Introduction
Running energy calculations in the cloud using the SolarFarmer desktop application is a good fit for most people. It handles setting up the input data required and displays the results returned.
However, it can also be useful to call the energy calculation yourself outside of the desktop application. So you can, for example, automate a set of runs, or set up different optimization scenarios.
There is some work needed for you to do to set up the required inputs, run the calculation and retrieve the results. This section of the documentation will help you understand how to do this and get you up and running.
Web API Token
In order to use the web API you will need a personal API token. See Acquiring your Web API Token.
API Versions
Two concurrent versions of the SolarFarmer API are supported. See SolarFarmer API Versions for how this works and the latest version numbers that are available.
The SolarFarmer Web Service site
The website where the web API server is located is here: https://solarfarmer.dnv.com/
Go to this website to:
- Retrieve your API token (see Acquiring your Web API Token)
- Use a simple interface to quickly try the endpoints (see Try the endpoints on the API website)
- View the automatically generated API documents (see https://solarfarmer.dnv.com/docs in the Schemas section)
- Download the C# client code, or the OpenAPI json specification document (from the links at the top of https://solarfarmer.dnv.com/docs)