This page provides a brief overview on the BETTER API, including how to create and access buildings, building analytics, portfolios and portfolio analytics.
For detailed information on endpoints, allowed values, and so on, please view the interactive "API Schema" documentation page by clicking the button at right.
To test the API from the command line:
Authorization
with a value of Token (your token)
. When setting this value, don't forget the space between "Token" and the token's random characters. (For more on setting headers in requests, see this article by Mozilla.)
For example, run the following command in a terminal on your machine to get a list of all buildings in JSON form:
curl -XGET https://better-lbnl.herokuapp.com/api/v1/buildings/ -H 'Authorization:Token (
your user's API token )'
The BETTER REST-based API was created to allow you to programmatically create portfolios and buildings and then run analytics on them. The API will grow over time, but at first only limited features are available through a small set of endpoints. Each time we improve the API we'll update the API Schema docs to reflect those changes.
The BETTER API operates as a simple REST-based api for creating, updating and deleting building and portfolios, and their related analytics.
Like most REST-based APIs, it supports the standard HTTP verbs (GET, POST, PATCH, DELETE) and uses json as the default data transport format.
Note that some endpoints also accept BuildingSync format. These docs will indicate support for that format where available.