English     Dutch     French     German     Spanish

API Calls

Modifié par Bart Verheecke le 2024/08/12 06:59

Pricing

If you are a developer or homeowner looking to access Eniris systems' data, you can subscribe to any of the plans listed on our webshop. The Watt plan provides free access to 1,000 hits each month. For additional access, you can subscribe to the Kilowatt plan or Megawatt plan. For Kilowatt and Megawatt plans, if you reach your monthly call limit and like to continue making API call requests, please contact us at info@eniris.io. 

Check https://eniris.odoo.com/shop/category/eniris-api-7

Eniris Authentication APIs

Eniris provides Authentication APIs, facilitating access through both MQTT and HTTPS protocols. Detailed documentation and interactive features for these APIs are available at the following links:

Eniris Metadata & Telemetry Query API

Additionally, Eniris offers a Metadata Query API, enabling users to retrieve telemetry-related data. The documentation for this API can be accessed via the following link: 

https://api.eniris.be/docs/

Telemetry Query API

Specifically for telemetry data, Eniris provides the Telemetry Query API. This API requires a POST request to the following URL:

POST https://neodata-ingress.eniris.be/v1/telemetry
 

The following query parameters are mandatory when using the Telemetry Query API:

  • u: Collector name
  • db: Database
  • rp: Retention policy

An example of a request to the Telemetry Query API might look like this:

https://neodata-ingress.eniris.be/v1/telemetry?u=klantennaam-ingress&db=klantennaam&rp=rp_one_m
[
    {
       "measurement": "exampleMetrics",
       "time": "2023-08-02T10:00:00Z",
       "tags": {
           "serialNr": "aaaabbbbccccdddd"
        },
       "fields": {
           "maximumProductionPower_W": 2000
        }
    }
]

api.png

Authorization Requirements

For accessing the Eniris APIs, it is crucial to include a valid Bearer authorization token. This token must be obtained by logging in as a user who is a member of the specific "CustomerName" role. Failure to provide a token associated with a user in the correct role will result in a 403 Forbidden response, accompanied by an error message indicating unauthorized access or incorrect permissions.

Server Response Codes

When interacting with Eniris APIs, the server can respond with a limited set of HTTP status codes, each indicating a specific type of response or error:

  • 204 No Content: Success, but no content in the body.
  • 400 Bad Request: Various formatting errors in the request.
  • 403 Forbidden: Authentication issues or incorrect permissions.
  • 404 Not Found: Attempts to write to an unknown namespace.
  • 409 Conflict: Conflicts with the allowed data time range or stored field types.
  • 422 Unprocessable Entity: Internal data type inconsistencies within the sent message.

Collection for postman

Below is a script for postman that helps handle the token generation. (see appendix)

Influx via api.postman_collection.json

Access timeseries data

1681128242876-647.png

Access a device (building/site)

GET https://api.eniris.be/v1/device?id=37142

1632835483913-618.png

To edit a property, use POST:

1632835529574-890.png

Tags : english
 

Applications

(c) Eniris, 2024