How to query for all devices inside a group

Hi All,

We have created hierarchical structure of assets and device with 1+ levels of hierarchy.
For eg:
Subsystem - group
IAQ - subgroup
device 1 - device
subgroup2 - subgroup
device 2 - device

So with the above structure if i have to retrieve all the devices within the Subsystem group, is there any way i can retrieve all the devices in one call?

Currently, im getting the getting the child assets of the group and checking if the type is device or group. if it is group then i’m querying it again to get all the child assets which is a inefficient way to get all devices. So please advice me how can i get the result in an efficient way.

Hi,

sorry, I don’t think there is another way. This should be implemented in the backend though…

Regards,

Marco

Hi,

I think you will need to use bygroupid() and the query language as described here to construct your query to get all devices in one single query.

Best regards
Christian

1 Like

Hi Christian,
Thanks for the response. If I have to make use of bygroupid() then I should know all the subgroup ids in prior right?

Yes, you would need to know the underlying subgroups and their ids.

Ok. Got it. thanks

~WRD0000.jpg

image001.png

image002.png

image003.png

image005.png

image006.png

image007.png

image004.png

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.