Updates a sensor with given parameters

Params

Param name Description
sensor
required

Object containing information about the sensor to be updated


Value: Must be a Hash
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean

Examples

Request - containing parameters to be modified
  curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" -d '{"sensor":{"description":"A water meter","tags":"1.5-Inch,Pune","traits":{"status":"green","customer_code":"12345"}}}' https://api.datonis.io/api/v2/sensors/t19afa692e4ttbce69e83b4e7585a94eaaf3f3e8

Response (returns details of the sensor updated)
{
  "sensor": {
    "bi_directional": false,
    "coordinates": [
      18.123,
      73.123
    ],
    "description": "A water meter",
    "sensor_key": "t19afa692e4ttbce69e83b4e7585a94eaaf3f3e8",
    "type": "Water Meter",
    "meta_data": null,
    "name": "WM-124",
    "state": null,
    "tags_array": [
      "1.5-Inch",
      "Pune"
    ],
    "traits": {
      "status": "green",
      "customer_code": "12345"
    },
    "unit_of_measure": null,
    "alive": false,
    "tags": "1.5-Inch,Pune",
    "last_event": null,
    "last_beat": null
  }
}