Sensors

This pages explains how to find information about specific sensors in the Airtrace Database and link them to plain projects or deployments generated by users.

Sensors lie inside Spots and Sensor-Spots and continuously send data to the Airtrace API (according to the commit interval) via links.

They are organized inside the Airtrace database throughout categories such as "Thermometer", "Humidity sensor", "Water Quality Sensor".

Sensor list as seen in airtrace.io

Finding your sensor in the Database

The user may find in order to link a sensor to a Spot or Plain Project, the only thing they need is the id of the sensor itself, which they can find in the list of sensors that Airtrace supports

Querying all of the sensors

The user can get a list of all the available sensors by calling the following API endpoint:

Get a list of all the sensors available

GET https://api.airtrace.io/v1/sensors

Finding a specific sensor

The user can also find a specific sensor if they know the id of the sensor itself:

Get information about a specific sensor

GET https://api.airtrace.io/v1/sensors/{id}

Path Parameters

Name
Type
Description

*

String

The id of the sensor the user wants to query

Finding the categories of a sensor

The user can get the list of categories associated with a specific sensor by providing the id of the aforementioned sensor:

Get categories of a specific sensor

GET https://api.airtrace.io/v1/sensors/{id_sensor}/categories

Path Parameters

Name
Type
Description

id_sensor*

String

The id of the sensor the user wants to query

Assigning sensors

Assigning a sensor to a Spot

The user can assign a sensor to a specific Spot inside a Hierarchical Project making use of the following endpoint:

Assigns a Sensor to a specific Spot

POST https://api.airtrace.io/v1/projects/{id}/deployments/{id_deployment}/spots/{id_spot}​/sensors

Path Parameters

Name
Type
Description

id_project*

String

The id of the project that will contain the Spot

id_deployment*

String

The id of the Deployment that will contain the Spot

id_spot*

String

The id of the Spot the sensor will be assigned to

Request Body

Name
Type
Description

id_sensor*

String

The id of the sensor that will be assigned to the Spot

Assigning a sensor to a Plain Project

The user can assign a sensor to a specific Plain Project making use of the following endpoint:

Assigns a Sensor to a Plain Project

POST https://api.airtrace.io/v1/plain/{id_project}/sensors

Path Parameters

Name
Type
Description

id_project*

String

The id of the Plain Project that will contain the Spot

Request Body

Name
Type
Description

id_sensor*

String

The id of the sensor that will be assigned to the Plain Project

Last updated