What is the most simple way to get a given camera settings from the sdk ?

hello,

i have checked the ConfigApiClient sample but i am wondering is there any simple way that i can specify the camera id or name and get all camera settings and streams information without the need to loop the CameraGroupFolder than loop their child’s to retrieve the camera settings ?

below the best i achieved, can it be optimized or simplified ?

var cameraGroups= _configApiClient.GetChildItems(“/CameraGroupFolder”).ToList();

  foreach (var group in cameraGroups)

  {

    group.Children = \_configApiClient.GetChildItems(group.Path);

    foreach (var cameraFolder in group.Children)

    {

      cameraFolder.Children = \_configApiClient.GetChildItems(cameraFolder.Path);

      foreach (var camera in cameraFolder.Children)

      {

        var settingsfolder = \_configApiClient.GetChildItems(camera.Path + "/DeviceDriverSettingsFolder").SingleOrDefault();

        var setting = settingsfolder.Children;

        var streamFolder = \_configApiClient.GetChildItems(camera.Path + "/StreamFolder").SingleOrDefault();

        var stream = streamFolder.Children;

      }

    }

  }

best regards,

Gaby

If you know the Id of the camera you are looking for you can construct the path and then you can use the GetItem() method.

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_configuration_items_1_1_configuration_service.html&tree=tree_search.html?search=getitem

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_configurationapi.html&tree=tree_search.html?search=getitem

PS. Some find the strongly typed classes easier to work with, if using this a method would be:

VideoOS.Platform.ConfigurationItems.Camera camera = new VideoOS.Platform.ConfigurationItems.Camera(_selectItem1.FQID);

Thank You for the help.