Creates an thing template with given parameters

Params

Param name Description
thing_template
required

Map containing details of the thing template to be created


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

Create thing template in child account by oem user if is_oem flag is true.


Value: Must be a Boolean
child_organisation_key
optional

Organisation key of child account where oem user wants to create thing template. Required field if is_oem is present.


Value: Must be a String

Examples

Request
  curl -X POST -H "Content-Type:application/json" -H "X-Auth-Token:olezAZXGQn9MutnfNerKDQ"  -d '{"thing_template":{"name":"Refrigerator","description":"Template for Refrigerators","user_defined_properties":{"Firmware Ver":"1.0","STATE":"OK"}}}' https://api.datonis.io/api/v3/thing_templates

Response (containing details of the thing template created)
{
  "thing_template": {
    "created_at": 1448361986,
    "description": "Template for Refrigerators",
    "name": "Refrigerator",
    "thing_template_key": "2a5t58bbt8",
    "updated_at": 1448361986,
    "user_defined_properties": {
      "Firmware Ver": "1.0",
      "STATE": "OK"
    },
    "metrics": [

    ]
  }
}