Ingest api: creating sensor types

In order to ingest data into ZENSIE, a sensor type has to be created. A sensor type contains information such as the metrics and units (e.g. Temperature = oC), data types and expected values. In order to create a new sensor type this endpoint can be used: POST /sensor-type/organization/{organizationId}

If we want to ingest data for counting insects and temperature we can do a POST request to


The body would look like this:

    "name": "Insect count and temperature",
    "description": "Counting insects in a greenhouse",
    "icon": "<i class=\"material-icons\">favorite</i>",
    "color": "#71cee9",
    "decimals": 1
    "metrics": ["count","temperature"],
    "jsonKeys": ["bug", "temp"],
    "jsonLabels": ["Bug", "Temperature"],
    "dataTypes": ["long", "double"],
    "external": true

The name of the sensor type

A description of the sensor type

The icon of the sensor (will appear in the sensor list + widgets). To view possible icons, visit

Color used for widgets

The precision of the measurements. If we have 1 decimal, we will ingest values like 10.4 or 8.1.

Id’s of metrics. Metrics determine what users see in the dashboard when viewing graphs. Temperature metric for example, displays the unit oC or F. To get a list of possible metrics, this endpoint can be used: GET /metric

Json keys etermine how data will be stored and retrieved.

Json labels determine what the user sees when selecting the metrics. If we for example have 2 temperature metrics with json keys temp1 and temp2, we can use the json labels to distinguish. E.g. Temperature greenhouse A, Temperature outside.

Data types determine the type of data that will be stored per json key. The possible data types are

["long", "double", "boolean", "string"]

Because we are adding external data, this property has to be set to true.

organizationId in the post url
The organization the sensor type will be added to.

Creating import checks

After the sensor type is created we can use this sensor type create import checks. These checks can be used to ingest data.