thing.create

The thing.create command creates a new Thing.

TR50 Request

{
  "cmd": {
    "command": "thing.create",
    "params": {
      "name": "My New Thing Name",
      "key": "12e692ba0f62g167",
      "defKey": "thingdefinitionkey",
      "desc": "Description of my new thing",
      "iccid": "123456789",
      "esn": "123456789",
      "tunnelActualHost": "192.168.4.241",
      "tunnelVirtualHost": "127.10.10.10",
      "tunnelLatencies": {
        "router01": 110,
        "router02": 340
      },
      "tags": ["tag1", "tag2"],
      "secTags": ["secTag1", "secTag2"],
      "controlTags": ["controlTag1", "controlTag2"],
      "attrs": {
        "attribute1key": {
          "value": "25",
          "ts": "2019-04-05T02:03:04.322Z"
        },
        "attribute2key": {
          "value": "Orange",
          "ts": "2019-04-05T02:03:04.322Z"
        }
      },
      "locEnabled": false
    }
  }
}

Request Parameters

Name Type Required Description
name String Yes The name of the Thing.
key String Yes The key of the Thing.
defKey String Yes* The Thing definition key .
defId String The Thing definition Id.
*One of the above parameters is required to identify the Thing definition.
desc String The textual description of the Thing.
iccid String The iccid of the Thing.
esn String The esn of the Thing.
imei String   The imei of the Thing.
meid String   The meid of the Thing.
imsi String   The imsi of the Thing.
msisdn String   The msisdn of the Thing.
tunnelActualHost String   The actual IP address or hostname that should be used from the Thing's gateway to reach the Thing.
tunnelVirtualHost String   The virtual IP address or hostname that will be used by the tunnel manager to access the tunnels.
tunnelLatencies String:Int Pairs   Mappings of key:value pairs indicating the latency between the Thing and each router. Note, this field will only be used on a directly connected Thing, Things bound to other Things will inherit the tunnelLatencies from their parent Thing.
tags Array   An array of tags associated with the Thing.
secTags Array   An array of security tags associated with the Thing.
controlTags Array   An array of control tags associated with the Thing
attrs Object   Key-value pairs where the key is the key of the attribute and the value is an attribute object.
<attrs-key>.value String This is the value of the attribute.
<attrs-key>.ts Timestamp The timestamp of the attribute.
locEnabled Boolean If the Thing is location enabled.
smsc String The SMSC for sending messages to the Thing via SMS.

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true
  }
}