How can I find a camera by its name or IP address?

I am creating a Web API using the service reference ({hostname}:80/ManagementServer/ServerCommandService.svc) to create bookmarks. I have easy access to the camera names and ip addresses, but those identifiers don’t appear to be available to me through the ServerCommandService.

camera.RecInfo = connections.ConfigInfo.Recorders;
camera.Recorder = camera.RecInfo.First(c => c.Name.Contains(cameraName));

I have a cameraName that looks something like “BWB - 067 Back Dock 3 (xx.xx.xx.xx)”

in the snippet, c.Name actually corresponds to what appears to be a Guid. Is there a way to drill down to get to the REAL camera name/ip or a way to map the guid to the known camera name?

You will find a camera by GUID. TCPVideoViewer sample might be helpful for you –

https://doc.developer.milestonesys.com/html/index.html?base=samples/tcpviewer_sample.html&tree=tree_3.html

You will find following code in the sample;

List<Camera> cameras = new List<Camera>();
foreach (ServerCommandService_CServer.RecorderInfo recorder in confInfo.Recorders)
{
    foreach (ServerCommandService_CServer.CameraInfo cameraInfo in recorder.Cameras)
    {
        Camera cam = new Camera();
        int colonIndex = recorder.WebServerUri.LastIndexOf(':');
        int slashIndex = recorder.WebServerUri.LastIndexOf('/');
        String portStr = recorder.WebServerUri.Substring(colonIndex + 1, slashIndex - colonIndex - 1);
        cam.Guid = cameraInfo.DeviceId;
        cam.Name = cameraInfo.Name;
        cam.RecorderUri = new Uri(recorder.WebServerUri);
        cameras.Add(cam);
    }
}

Thank you. I was able to modify the method this snippet came from to find my cameras by name/guid.