thing.attr.set

The thing.attr.set command is used to set an attribute for a thing.

TR50 Request


{
  "cmd": {
    "command": "thing.attr.set",
    "params": {
      "thingKey": "mything",
      "key": "boardid",
      "value": "102",
      "republish": true
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

thingId

String

 

Identifies the thing by id to which the attribute is to be associated.

Note:

If a thing identifier is not provided, the thingKey associated with your session will be used.

thingKey

String

 

Identifies the thing by key to which the attribute is to be associated.

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.

key

String

Yes

The key for the attribute that you want to get.

value

String

Yes

The value of the attribute.

republish

Boolean

By default, if the published value is the same as the current value, a new record will not be added. Set to true to force the record of the value to be added. If not set, the default value is false.

corrId

String

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

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