Swagger#

If you want to use the Swagger UI to interact with the Energy API, you can use the following link: SwaggerUI

Restrictions For API calls that involve large amounts of data, such as the endpoint /api/v1/power-balance-forecast/short-term without the balanceCategory parameter, it is recommended to use tools like Postman or similar. These tools can handle large payloads more efficiently and provide better control over the request and response process. For more information on how to set up Postman, please visit: postman.

Authentication#

The API uses a token-based authentication system. To get a token, navigate to the /api/v1/auth endpoint and provide your Nena portal credentials. The response will contain a token that you can use to authenticate your requests.

To authenticate your requests, click on the “Authorize” button in the top right corner of the Swagger UI.

Authorize

A popup will appear where you can paste the token and click “Authorize”.

After pasting the token, you can close the popup and start making requests to the API. The token will be included in the header of all your requests. The token is valid for 60 minutes. When it expires, you will need to get a new token by following the steps above. Data you don’t have access to will return a 403 Forbidden response.

Access Data#

The API provides access to a wide range of data. Once authenticated, you can access the data.

Example Request

Locate the endpoint you want to access, click on it to expand the endpoint, and click on the “Try it out” button.

You will see that an endpoint has a number of parameters that you can use to filter the data. Some are required and some are optional. Fill in the parameters you want to use and click on the “Execute” button. Some endpoint descriptions will point to another endpoint that shows the allowed data values.

When you execute the request, you will see the response in the “Response body” section.

If you get an error, you will see the error message in the “Response body” section.