How to get view groups from the sdk in admin plugin ?

I am trying to retrieve the list of view groups from admin section in the plugin.

I tried:

List viewGroups = VideoOS.Platform.Configuration.Instance.GetViewGroups().ToList();

returns an empty list.

And

List listViewsGroups = VideoOS.Platform.Configuration.Instance.GetItemsByKind(Kind.View);

return the server instead of the view groups (see attached pic). this method is working fine in the smart client code behind side but not from the admin side (management client).

So what is the right way to get the view groups from the admin plugin.

Ps: the user have the permission to read and write to the view groups.

best regards,

Gaby

Sorry, we have not exposed View Groups in the Management Client.

It is available through the ServerCommandService.GetViewGroups and GetViewGroupData - but it is undocumented XML format - so not really easy to manage.

Ok, thanks for the reply.

By design, it is impossible to get view groups from the Admin plugin. Can you please tell us what is the purpose for getting the view groups?

I am wondering if you want to get camera groups instead of the view groups?

Actually i need both , i am creating a room concept where each room (camera group) contain 2 cameras plus information about the room to store in my plugin . i am creating smart client views for each room . My goal is on button click to get the view created for this camera group and go to the preview tab in the smart client. So what i needed is the ability to get the smart client views to bind them with my rooms and with the camera group . I added this functionality in the smart client plug -in and it is now working.

i attached a screenshot of the page

As already mentioned by Anders View Groups are not exposed by MIP in the Management Client. We will put this on the wish-list for future development. We cannot say when (or even if) this will be developed.