thing.create
The thing.create command is used to create 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"],
"attrs": {
"attribute1key": {
"value": "25",
"ts": "2014-04-05T02:03:04.322Z"
},
"attribute2key": {
"value": "Orange",
"ts": "2014-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 of the thing. |
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 |
|
Not applicable. |
tunnelVirtualHost |
String |
|
Not applicable. |
tunnelLatencies |
String:Int Pairs |
|
Not applicable. |
tags |
Array |
|
An array of tags to be assigned to the thing. |
secTags |
Array |
|
An array of security tags to be assigned to 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. |
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
}
}