Skip to main content

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

Request Body required
  • label object[]

    array with label objects in different languages specified for the sensor

  • value string

    the label text itself

  • lang string

    languageCode for the language of the label. e.g. en, de,...

  • description object
  • text string

    the description text

  • device object[]

    array with the devices to connect to the sesnor

  • device integer

    the id of the device to connect

  • sensorElement object[]

    array with the sensor elements of the sensor to create

  • phenomenonId integer

    the id of the phenomenon to connect to the sensor element

  • unitId integer

    the id of the unit to connect to the sensor element, 'null' if not specified

  • accuracyValue float

    the 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

Responses

OK


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