Camera groups using rest api returns only top level groups?

When i call following rest api to get all camera groups i am only getting top level group details.

http://localhost/API/rest/v1/cameraGroups

Can I get all camera groups including children’s using rest api in any way

please help

This is a layered hierarchy or tree structure..

When you do the command above you get the first layer.

You can then pick one to the ViewGroups and see if it contains sub groups, it would look like this (GUID is from my test system)

https://localhost/api/rest/v1/viewgroups/c2cf7778-d0e7-4154-a9d3-ee3b48061158/viewgroups

Note that the tree can be deeper, the user can define sub-groups of sub-groups (of sub-groups ..). So you should continue down through the tree recursively or similar.

When you have the right ViewGroup you can see the Views it contains.

https://localhost/api/rest/v1/viewgroups/21409a77-edec-4733-8499-b0a3492ad835/views

The answer you have provided is about view groups. But i need camera groups.

I am sorry for answering the wrong question but the answer or principle is the same.

To see the cameraGroups under a cameraGroup

https://localhost/api/rest/v1/cameraGroups/f03dbeb4-cec3-4116-9ba1-9ef266055cbc/cameraGroups

You can work your way down through the tree..

I happen to have a conversation with a developer colleague, and I was missing out on the best answer. I am glad to be able to show you this:

https://localhost/api/rest/v1/cameraGroups?includeChildren=cameraGroups,cameras(id,displayName)