Adds specified user defined properties on a thing

Params

Param name Description
user_defined_properties
optional

map of key value pairs to be set


Value: Must be a Hash
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean
is_oem
optional

Add user defined properties in thing of child account by oem user if is_oem flag is true.


Value: Must be a Boolean

Examples

Request - containing user defined properties to be added
  curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A"  -d '{"user_defined_properties":{"status":"green","customer_code":13433}}' https://api.datonis.io/api/v3/things/8955641a65/set_user_defined_properties

Response (returns details of the thing with updated user_defined_properties (properties))
{
  "thing": {
    "bi_directional": true,
    "coordinates": [
      18.123,
      73.123
    ],
    "created_at": 1448363909,
    "description": "Thing for washing machines",
    "name": "Fully Automated Washing Machine",
    "state": null,
    "tags_array": [
      "Pune"
    ],
    "thing_key": "8955641a65",
    "updated_at": 1448432550,
    "user_defined_properties": {
      "Firmware Ver": "1.0",
      "STATE": "OK",
      "Installation Type": "Free Standing",
      "Manufacturer": "LG",
      "Color": "White",
      "status": "green",
      "customer_code": 13433
    },
    "alive": false,
    "tags": "Pune",
    "last_event": null,
    "last_beat": null,
    "thing_template_name": "Washing Machine",
    "thing_template_key": "af31ae5fb2"
  }
}