REST API
REST API
Overview of the Eliona REST APIThe Eliona REST API enables unified access to the resources and data of an Eliona environment. The API description is available in the widely used format OpenAPI is available and can therefore be reused in many ways.
The Eliona App SDK enables access to Eliona via the API with prebuilt libraries for different programming languages.
Access and authentication
The Eliona API can be accessed via the URL path /api/v2 can be reached. If the URL for Eliona is, for example, https://meine.eliona.domain, then the API can be reached via the following URL:
https://meine.eliona.domain/api/v2
An API key must be used for authentication. This is issued per application by the Eliona administrator and may have an expiration date. To create one, it must be known which endpoints of the API are needed and whether read or write access will be performed through them. The API key must be included in the HTTP header of the request as X-Api-Key to be included:GET https://meine.eliona.domain/api/v2/assets/158X-Api-Key: {{key}}
Postman Collection with examples
A Postman collection with several request examples is available for easy API testing. You can import the file postman_collection.json directly into Postman via the following URL. Before using the collection, make sure you update the variables api-server and read-write-token according to your environment.
Clients for access to the API
Clients for different programming languages
With the OpenAPI description of the interface, it is possible using OpenAPI generators to create suitable clients for a wide variety of programming languages. Various methods are available for generation. It is recommended to use the provided Docker image. To do this, reference the current version of the OpenAPI description:
https://raw.githubusercontent.com/eliona-smart-building-assistant/eliona-api/main/openapi.yaml
Here is an example command to generate a client for the Go programming language.
For the programming languages Go and Python, a client is currently continuously updated and provided via GitHub.
Postman: Importing the API description
The OpenAPI description of the Eliona REST interface can be imported into Postman. This makes all endpoints available for queries. To do this, the following URL must be imported into Postman:
https://raw.githubusercontent.com/eliona-smart-building-assistant/eliona-api/main/openapi.yaml

Import URL for workspaceAfter the OpenAPI file has been imported, all endpoints are available. For the API to be used, the API key must be entered under Authorization and the respective base URL under Variables.
Mock for API tests
An appropriate Eliona mock is available for testing with the API. It can be used independently of a complete Eliona environment. The mock provides a complete API implementation and a simplified Eliona database via Docker network. The matching docker-compose.yml and the database definition are provided via GitHub:
Last updated
Was this helpful?
