Bosch IoT Device Management

Working with directories

Directories are the first grouping mechanism available in Bosch IoT Manager, followed by tags and filters. Directories can be used to organize devices hierarchically and include them in mass management actions.

A device can belong to only one directory at a time but can be moved between directories at any time.

The following examples show you how to create a directory and subdirectories, how to list all created directories or get a particular one, how to move a device into a directory, as well as how to list all devices in a directory.

Create a directory

The following code snippet demonstrates how to create a directory with the name myDirectory. The new directory will be created under the root group ('/').


Create a subdirectory

Create a subdirectory of myDirectory from the example above:


Get a directоry

Get the newly created myDirectory from the example above:"/myDirectory");

List directories

List all existing directories on pages of 10 elements each:


Move a directоry

Move the newly created myDirectory into another directory e.g. newContainerDir:

deviceInventory.moveDirectory("/myDirectory", "/newContainerDir");

Move a device to a directory

Move a device with a particular deviceId to a particular directory, for example myDirectory:

deviceInventory.moveDevice(deviceId, "/myDirectory");

List the devices of a directory - from the directory object directly

List all devices contained in myDirectory, including its subdirectories, which have been set a particular attribute, for example myAttribute:

/* Page size */
/* include subdirectories */

List the devices of a directory - using DeviceInventory and ready-to-use filters in Criteria class

List all devices included in myDirectory:


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