thing.tag.delete
The thing.tag.delete command is used to remove tag(s) from a thing.
TR50 Request
{
"cmd": {
"command": "thing.tag.delete",
"params": {
"thingKey": "mything",
"tags": ["tag1", "tag2"]
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
thingKey | String or Array | Identifies the thing that the tags will be removed from. Defaults to the session's Thing. | |
tags | Array | Yes | The array of tags to be removed from the thing. |
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
}
}
C API
// basic API
int tr50_thing_tag_delete(void *tr50, const char *tags[], const int count);
// extended API
int tr50_thing_tag_delete_ex(void *tr50, const char *tags[], const int count, void* optional_params, void** optional_reply, char** error_msg);
JAVA API
// Synchronous
int tagDelete(String[] thingKey, Object response, String... tags);
// Asynchronous
int tagDelete(String[] thingKey, DwOpenReceiveActionListener recv, Object response, String... tags)
Response Objects: StringReply, DwOpenResponse
API will return success if the tag requested to delete is already removed.