thing.attr.unset
The thing.attr.unset command removes an attribute value from a thing.
TR50 Request
{
"cmd": {
"command": "thing.attr.unset",
"params": {
"thingKey": "mything",
"key": "boardid"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
thingId | String | Yes* | Identifies the thing by id to which the attribute is to be associated. |
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. | |
*One of the above parameters is required to identify the thing. If omitted, the thingKey associated with your session will be used. | |||
key | String | Yes | The key for the attribute that you want to unset |
corrId | String | A correlation ID that can be used when querying to find related data objects. |
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
TR50 Response
{
"cmd": {
"success": true
}
}
C API
// basic API
int tr50_thing_attr_unset(void *tr50, const char *key);
// extended API
int tr50_thing_attr_unset_ex(void *tr50, const char *key, void* optional_params, void** optional_reply, char** error_msg);
JAVA API
// Synchronous
int attributeUnset(String thingKey, String attrKey, Object response);
// Asynchronous
int attributeUnset(String thingKey, String attrKey, DwOpenReceiveActionListener recv, Object response);
Response Objects: StringReply, DwOpenResponse