Create a new sensor
Creates a new sensor from the information given in the requestBody
Header Parameters
- Authorization string required
Token retrieved from the opensensemap API LogIn
- application/json
Request Body required
label object[]
array with label objects in different languages specified for the sensor
value stringthe label text itself
lang stringlanguageCode for the language of the label. e.g.
en,de,...description object
text stringthe description text
device object[]
array with the devices to connect to the sesnor
device integerthe id of the device to connect
sensorElement object[]
array with the sensor elements of the sensor to create
phenomenonId integerthe id of the phenomenon to connect to the sensor element
unitId integerthe id of the unit to connect to the sensor element, 'null' if not specified
accuracyValue floatthe accuracy value of the sensor element
- manufacturer string
the name of the manufacturer of the sensor; 'null' if currently not specified
- price float
the price of the sensor; 'null' if currently not specified
- datasheet string
a link to the datasheet of the sensor, 'null' if currently not specified
- lifePeriod integer
the estimated life period of the sensor, 'null' if currently not specified
- image string
the name of the belonging image of the sensor so that it can be retrieved from the source; 'null' if currently not specified
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema
- id integer
the id of the created sensor
- slug string
the slug of the created sensor
- manufacturer string
the name of the manufacturer of the sensor; 'null' if currently not specified
- lifePeriod integer
the estimated life period of the sensor, 'null' if currently not specified
- price float
the price of the sensor; 'null' if currently not specified
- image string
the name of the belonging image of the sensor so that it can be retrieved from the source; 'null' if currently not specified
- datasheet string
a link to the datasheet of the sensor, 'null' if currently not specified
- validation boolean
boolean that is true if the information is validated by an admin
- labelId integer
the id of the created translation item
- descriptionId integer
the id of the created translation item
{
"id": 0,
"slug": "string",
"manufacturer": "string",
"lifePeriod": 0,
"image": "string",
"datasheet": "string",
"validation": true,
"labelId": 0,
"descriptionId": 0
}