Skip to main content

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

Request Body required
  • id integer

    the id of the device to edit

  • description object
  • translationId integer

    the translationId of the description item to edit

  • text string

    the description text to edit

  • markdown object
  • translationId integer

    the translationId of the markdown item to edit

  • text string

    the markdown 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,...

  • sensor object[]

    array with the sensors connected to the device

  • sensor integer

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

    the 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

Responses

OK


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