Edit a device
Edits a specific device 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 device to edit
description object
translationId integerthe translationId of the description item to edit
text stringthe description text to edit
markdown object
translationId integerthe translationId of the markdown item to edit
text stringthe markdown 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,...sensor object[]
array with the sensors connected to the device
sensor integerthe id of the sensor to connect
exists boolean'true' if it is an existing sensor connection, 'false' if it is a new sensor connection
deletedSensors object[]
array with the sensors to be disconnected from the device
sensor integerthe id of the sensor to disconnect
exists boolean'true' if it is an existing sensor connection, 'false' if it is a new sensor connection
- website string
a url that leads to the website of the device; 'null' if currently not specified
- contact string
contact information to get help/support on the devices functionality; 'null' if currently not specified
- image string
the name of the belonging image of the device 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 device
- slug string
the slug of the created device
- website string
a url that leads to the website of the device; 'null' if currently not specified
- contact string
contact information to get help/support on the devices functionality; 'null' if currently not specified
- image string
the name of the belonging image of the device so that it can be retrieved from the source; '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
- markdownId integer
the id of the created translation item
{
"id": 0,
"slug": "string",
"website": "string",
"contact": "string",
"image": "string",
"validation": true,
"labelId": 0,
"descriptionId": 0,
"markdownId": 0
}