thing.tag.cloud

The thing.tag.cloud command is used to generate a tag cloud for things.

TR50 Request


                        {
  "cmd": {
    "command": "thing.tag.cloud",
    "params": {
      "tags": ["tag1", "tag2"],
      "keys": ["mything1", "mything2"]
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

tags

Array

 

An array of tags. The result will be limited to the tags associated with things that already have the indicated tags.

keys

Array

 

An array of thing keys. The result will be limited to the tags associated with things identified by the submitted thing keys.

TR50 Response

If the command is sent successfully a success message and the tag cloud object is returned. Otherwise, an error and error message will be returned.


                        {
  "cmd": {
    "success": true,
    "params": {
      "result": [
        {
          "tag1": 8
        },
        {
          "tag2": 3
        }
      ],
      "special": [
        {
          "connected": 5
        },
        {
          "disconnected": 5
        }
      ]
    }
  }
}
      

Response Parameters

Name

Type

Description

result

Array

An array of objects. Each object will be a tag and the number of things that have that tag. In the above example, 8 things have tag1, and 3 things have tag2.

special

Array

An array of objects. Each object will be a special tag and the number of things that have that special tag. In the above example, there are 5 things that are connected, and 5 things that are disconnected.