thing.update

The thing.update command is used to update an existing thing.

TR50 Request


                        {
  "cmd": {
    "command": "thing.update",
    "params": {
      "key": "12e692ba0f62g167",
      "name": "My New Thing Name",
      "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"],
      "locEnabled": false,
      "unset": ["desc", "tags", "iccid", "esn", "secTags"]
    }
  }
}
      

Thing Identifier Parameters

Note:

The parameters listed in the table below are required to identify the thing. If omitted, the thingKey associated with your session will be used.

Name

Type

Description

thingKey

String

The key of the Thing to be updated. Defaults to the session's Thing.

thingId

String

Id of the thing.

esn

String

Esn of the thing.

iccid

String

Iccid of the thing.

imei

String

Imei of the thing.

imsi

String

Imsi of the thing.

meid

String

Meid of the thing.

msisdn

String

Msisdn of the thing.

The following fields can be updated. If the value of the field does not change, you do not need to include it in the params object.

Name

Type

Required

Description

name

String

 

The updated name of the thing.

desc

String

 

The updated textual description of the thing.

iccid

String

 

The updated iccid of the thing.

esn

String

 

The updated esn of the thing.

imei

String

 

The updated imei of the thing.

meid

String

 

The updated meid of the thing.

imsi

String

 

The updated imsi of the thing.

tunnelActualHost

String

 

Not applicable.

tunnelVirtualHost

String

 

Not applicable.

tunnelLatencies

Sring:Int Pairs

 

Not applicable.

corrId

String

A correlation ID that can be used when querying to find related data objects.

tags

Array

 

The array of tags the thing should now have.

secTags

Array

 

The array of security tags the thing should now have.

locEnabled

Boolean

 

If the thing is location enabled.

data

Object

 

Opaque data store object with valid keys. If provided, overwrites the existing data object.

unset

Array

 

An array of fields that should be unset. The example above lists all of the fields that can be unset. If no fields will be unset, this parameter should be omitted.

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
  }
}