Adds specified user defined properties on a thing template
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 template of child account by oem user if is_oem flag is true. Value: Must be a Boolean |
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":{"Color":"Red"}}' https://api.datonis.io/api/v3/thing_templates/2a5t58bbt8/set_user_defined_properties Response (returns details of the thing template with updated user defined properties) { "thing_template": { "created_at": 1448361986, "description": "Thing Template for Refrigerators", "name": "Refrigerator", "thing_template_key": "2a5t58bbt8", "updated_at": 1448367485, "user_defined_properties": { "Firmware Ver": "1.0", "STATE": "OK", "Color": "Red" }, "metrics": [ { "metric_key": "d3tdc136b3", "metric_name": "temperature" }, { "metric_key": "b44c32be53", "metric_name": "power" }, { "metric_key": "c6a86c8576", "metric_name": "voltage" } ] } }