Edit a sensor
Edits a specific sensor by the information given in the requestBody
Header Parameters
- Authorization string required
Token retrieved from the opensensemap API LogIn
- application/json
Request Body required
- id integer
the id of the sensor to edit
description object
translationId integerthe translationId of the description to edit
text stringthe description text to edit
label object[]
array with label objects in different languages specified for the sensor to be edited
translationId integerthe translationId of the label to be edited, 'null' if it is a newly created label
value stringthe label text itself
lang stringlanguageCode for the language of the markdown text. e.g.
en,de,...deletedLabels object[]
array containing all the label to be deleted from the sensor
translationId integerthe translationId of the label to be deleted
value stringthe label text itself
lang stringlanguageCode for the language of the markdown text. e.g.
en,de,...device object[]
array with the devices connected to the sensor
device integerthe id of the device to connect
exists boolean'true' if it is an existing device connection, 'false' if it is a new device connection
deletedDevices object[]
array with the devices to be disconnected from the sensor
device integerthe id of the device to disconnect
exists boolean'true' if it is an existing device connection, 'false' if it is a new device connection
sensorElement object[]
array with the sensor elements of the sensor
sensorElementId integerthe id of the sensor element; 'null' if it is newly created
phenomenonId integerminimum of the unit range
unitId integerthe id of the unit that is connected to the sensor element
accuracyValue integerthe accuracy value of the sensor element; 'null' if currently not specified
deletedSensorElements object[]
array with the sensor elements of to delete
sensorElementId integerthe id 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
}