Bosch IoT Manager

Working with tags

Tags facilitate the grouping of and searching for devices. A device may have multiple tags attached to it, meaning that in such cases it will be included in multiple tag groups.

The examples below demonstrate how you can create a tag and list created tags, as well as how you can tag a device and list tagged devices.

Create a tag

Execute the following code to create a tag with a particular name, such as myTag:


List tags

List all existing tags grouped in pages of 10 elements each:


Tag a device

Attach the newly created tag from the example above to a device with a particular deviceId:

deviceInventory.tagDevice(deviceId, tagName);

List tagged devices - using a tag object

List all devices which have been tagged with myTag and have been set a particular attribute, for example myAttribute:

/* Page size */

List tagged devices - using DeviceInventory and ready-to-use filters in Criteria class

List all devices tagged with myTag:


Tags can have attributes, described in more detail in Working with attributes.