We have an api that allows users to request camera stream urls. Our api takes a camera id and connects to the MIP SDK mobile api to get a connection id, authenticate using a pre-defined user, and then get the camera stream, which it then sends back to the client.
We want to pre-cache the connection id for the XProtect user when the api starts up so by the time the first request comes in, we already have a valid connection id for quickly getting the camera stream. We will keep the connection alive using the LiveMessage command.
The issue is that to get the connection id you have to issue a Connect command which requires a DeviceId parameter. We had been using camera id passed in by the client for this purpose but since we are now calling Connect before any actual camera stream requests come in, we can’t use the camera id anymore. Do we need an actual camera id for this or can we pass in any random uuid?
<?xml version="1.0" encoding="UTF-8"?>
<Communication>
<ConnectionId>8cedf53b-7fae-45e1-afc6-3fcd6861d012</ConnectionId>
<Command>
<Type>Request</Type>
<Name>Connect</Name>
<InputParams>
<Param Name="PublicKey" Value="xxx" />
<Param Name="DeviceId" Value="some random uuid" />
<Param Name="PrimeLength" Value="2048" />
</InputParams>
</Command>
</Communication>