Removes specified user defined traits (properties) on a sensor

Params

Param name Description
traits
optional

List of trait keys to be removed


Value: Must be an array of any type
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean

Examples

Request - containing traits (properties) to be removed
  curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A"  -d '{"traits":["customer_code"]}' https://api.datonis.io/api/v2/sensors/16dc891e4b255735d7tafete13e6fdc412628t84/remove_traits

Response (returns details of the sensor with updated traits (properties))
{
  "sensor": {
    "bi_directional": false,
    "coordinates": [
      "18.5203",
      "73.8567"
    ],
    "description": "",
    "sensor_key": "16dc891e4b255735d7tafete13e6fdc412628t84",
    "type": "Energy Meter",
    "meta_data": {
      "properties": {
        "voltage": {
          "type": "number"
        },
        "power": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "name": "EM-100",
    "state": "registered",
    "tags_array": [
      "1-Phase",
      "15-Amps",
      "Pune"
    ],
    "traits": {
      "status": "green"
    },
    "unit_of_measure": null,
    "alive": false,
    "tags": "1-Phase,15-Amps,Pune",
    "last_event": null,
    "last_beat": 1428644189
  }
}