Skip to content

API Reference#

Every endpoint of api/v0 is described below, including the OEDB table and row endpoints, the dataset endpoints and the OEKG scenario-bundle endpoints.

The description is generated from the code, not written by hand: it is produced by python manage.py spectacular and committed to the repository as openapi.yaml, so a pull request shows what the description of the API became. A test in the suite regenerates it and fails if the committed file has fallen behind, naming the command that brings it back in step.

This is the only description of api/v0

It used to share the job with a hand-written file behind the OEDB page. That file is gone: every endpoint it described is here, described from the code rather than by hand. The guides next to this page explain what the endpoints are for and link here for what they take.

Linking to a section

The endpoints are grouped into named sections -- Tables, Datasets, Scenario Bundles, the advanced/ interface, and the superseded surfaces last -- and each section has an address of its own, so another page can point at one and open the reference there. The Scenario Bundles section is web-api/api-reference/#/Scenario%20Bundles; a section whose name carries spaces spells them %20, which is the form the page itself writes into the address bar when you open a section.

The names are chosen rather than taken from the addresses, which is what makes those links survive a route moving, and what lets a section say that it is superseded and name what replaced it.

OEP-API Token

Most write endpoints need authentication. Register at https://openenergyplatform.org/accounts/signup/ or sign in with your institution, then find your API token on your profile page under the "Settings" tab.

See the guide on how to get started with the OpenEnergyPlatform.

The same description is served live by the running platform at https://openenergyplatform.org/api/v0/schema/, and rendered there at https://openenergyplatform.org/api/v0/open-api/.

API Documentation