Skip to main content

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

Request Body required
  • id integer

    the id of the sensor to edit

  • description object
  • translationId integer

    the translationId of the description to edit

  • text string

    the description text to edit

  • label object[]

    array with label objects in different languages specified for the sensor to be edited

  • translationId integer

    the translationId of the label to be edited, 'null' if it is a newly created label

  • value string

    the label text itself

  • lang string

    languageCode 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 integer

    the translationId of the label to be deleted

  • value string

    the label text itself

  • lang string

    languageCode for the language of the markdown text. e.g. en, de,...

  • device object[]

    array with the devices connected to the sensor

  • device integer

    the 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 integer

    the 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 integer

    the id of the sensor element; 'null' if it is newly created

  • phenomenonId integer

    minimum of the unit range

  • unitId integer

    the id of the unit that is connected to the sensor element

  • accuracyValue integer

    the accuracy value of the sensor element; 'null' if currently not specified

  • deletedSensorElements object[]

    array with the sensor elements of to delete

  • sensorElementId integer

    the 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

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