-
Notifications
You must be signed in to change notification settings - Fork 36
Home
NOTE: The documentation in this wiki is for using the API. For documentation on developing the REopt® API please go here.
The REopt API recommends an optimal mix of renewable energy, conventional generation, and energy storage technologies to meet cost savings and energy performance goals, including the hourly optimal operation of the system. In addition to this API, the REopt Web Tool provides an interface for interactively setting up input parameters. Click here for more information about the REopt model.
The API is hosted at https://developer.nrel.gov/api/reopt
. In order to access the API you need to get an API key. Once you have a key you can access the API with something like:
https://developer.nrel.gov/api/reopt/stable/help?API_KEY=DEMO_KEY
You will have to replace DEMO_KEY
with your own key (the DEMO_KEY
only allows a few hits per day).
The REopt API includes many endpoints. However, the main use case is running an optimization job and getting the results of the job, which is a two-step process.
First, you POST your REopt Scenario to the job endpoint, i.e. https://developer.nrel.gov/api/reopt/stable/job. POST'ing can be done with many tools. This repository includes python functions to make it easy to POST your jobs to the API.
The job
endpoint will return a run_uuid
in JSON format, like
{"run_uuid": "288523d9-b3ca-491b-a490-27b10c384ce1"}
Go here for information on all the inputs for a job.
The second step is to GET
your results at the results
endpoint using your run_uuid
. The URL will look like:
https://developer.nrel.gov/api/reopt/stable/job/288523d9-b3ca-491b-a490-27b10c384ce1/results
Note that it can take some time to optimize your Scenario. While the job is running the Scenario.status
will be "Optimizing...". Once the job is complete the status will be "optimal" (assuming no problems were encountered).
The API response will contain three top level keys:
- "inputs": all of the inputs that you provided in addition to all the other default values that were used;
- "outputs": the optimization results; and
- "messages": information on input validation as well as errors if they occured.
Go here for information on all the outputs for a job.