Creates a thing with given parameters

Params

Param name Description
thing
required

Object containing information about the thing 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 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. 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:WtUFnj8pvSxVnH9e_xkq7A" -d '{"thing":{"name":"Fully Automated Washing Machine","description":"Thing for washing machines","user_defined_properties":{"Firmware Ver":"1.0","STATE":"OK","Installation Type":"Free Standing","Manufacturer":"LG","Color":"White"},"bi_directional":"true","tags":"Corporate","coordinates":[21.15,79.09]},"thing_template_key":"af31ae5fb2"}' https://api.datonis.io/api/v3/things

Response (returns details of the thing created)
{
  "thing": {
    "bi_directional": true,
    "coordinates": [
      21.15,
      79.09
    ],
    "created_at": 1448363909,
    "description": "Thing for washing machines",
    "name": "Fully Automated Washing Machine",
    "state": null,
    "tags_array": [
      "Corporate"
    ],
    "thing_key": "8955641a65",
    "updated_at": 1448363909,
    "user_defined_properties": {
      "Firmware Ver": "1.0",
      "STATE": "OK",
      "Installation Type": "Free Standing",
      "Manufacturer": "LG",
      "Color": "White"
    },
    "alive": false,
    "tags": "Corporate",
    "last_event": null,
    "last_beat": null,
    "thing_template_name": "Washing Machine",
    "thing_template_key": "af31ae5fb2"
  }
}