Create a new device
Creates a new device 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 device
value stringthe label text itself
lang stringlanguageCode for the language of the lebel. e.g.
en,de,...description object
text stringthe description text
markdown object
text stringthe markdown text
sensor object[]
array with the sensors to connect to the device
sensor integerthe id of the sensor to connect
- 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
}