thing.sectag.delete

The thing.sectag.delete command is used to remove security tag(s) from a thing.

The things the security tags to be removed from can be specified by:

  • A single thingKey for a single thing.

  • An array of thingKeys for multiple things.

  • An array of tags for multiple things.

  • A parameter that indicates all things.

TR50 Request


                        // Remove security tags from a single thing
{
  "cmd": {
    "command": "thing.sectag.delete",
    "params": {
      "thingKey": "mything",
      "secTags": ["sectag1", "sectag2"]
    }
  }
}

// Remove security tags from multiple things
{
  "cmd": {
    "command": "thing.sectag.delete",
    "params": {
      "thingKey": ["mything1", "mything2"],
      "secTags": ["sectag1", "sectag2"]
    }
  }
}

// Remove security tags by tags
{
  "cmd": {
    "command": "thing.sectag.delete",
    "params": {
      "thingTag": ["tag1", "tag2"],
      "secTags": ["sectag1", "sectag2"]
    }
  }
}

// Remove security tags from all things
{
  "cmd": {
    "command": "thing.sectag.delete",
    "params": {
      "thingAll": true,
      "secTags": ["sectag1", "sectag2"]
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

thingKey

String

 

A thing key to identify the thing that the security tag(s) will be deleted from.

thingKey

Array

 

An array of thing keys to from the security tag(s) from.

thingTag

Array

 

An array of thing tags identifying things that the security tag(s) will be removed from.

thingAll

Boolean

 

Delete security tag(s) from all things (the value must be true).

secTags

Array

Yes

The array of security tags to be deleted from thing(s).

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