thing.sectag.add

The thing.sectag.add command is used add security tag(s) to things.

TR50 Request


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

 
// add security tags to multiple things
{
  "cmd": {
    "command": "thing.sectag.add",
    "params": {
      "thingKey": ["mything1", "mything2"],
      "secTags": ["sectag1", "sectag2"]
    }
  }
}
 
// add security tags by tags
{
  "cmd": {
    "command": "thing.sectag.add",
    "params": {
      "thingTag": ["tag1", "tag2"],
      "secTags": ["sectag1", "sectag2"]
    }
  }
}

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

Request Parameters

Name

Type

Required

Description

thingKey

String

 

A thing key to identify the things that the security tag(s) will be added to.

thingKey

Array

 

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

thingTag

Array

 

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

thingAll

Boolean

 

Add security tag(s) to all things (the value must be true).

secTags

Array

Yes

The array of security tags to be added to 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
  }
}