Web API Tutorials
These are a few simple tutorials for getting you up and running with SolarFarmer's web API.
These tutorials use the Python scripting language (see https://www.python.org/). You can call the web API using any language you like as long as it supports calls to web APIs.
The SolarFarmer web API has various endpoints (see https://en.wikipedia.org/wiki/Web_API for background information on web APIs). Each
tutorial will focus on one endpoint. The ModelChain
endpoint is the one that is used for running energy calculations.
Requirements for tutorials
You will need a personal API key to use the SolarFarmer web API. See Acquiring your Web API Key for more information on acquiring your API key.
You will also need to install and set up a Python environment on your machine. See Setting up a Python Environment for more information on this.
About
endpoint tutorial
Start with this simple tutorial. It uses the About
endpoint of the API to return details about the API version.
It will help you make sure that your API key is working and that you have access to the web API.
SolarPosition
endpoint tutorial
Another simple tutorial. It uses the SolarPosition
endpoint to use the API to calculate the solar position
using the latitude, longitude, elevation and time input parameters that you provide.
ModelChain
endpoint tutorials
This is the main endpoint of the web API. It runs the energy calculation for the set of inputs that you supply.