I have some questions about leveraging the REST API in Milestone 2022 R2 and I wanted to see if you could help me with getting some answers.
I am working with another team here at Apple that has the following request:
"Basically we require the nvr to host a REST API on which we can make a get request to connect to a camera using opencv . For reference, here is the exacq webAPI command we use to connect to a give cameras video stream https://crm.exacq.com/release/evWebAPI/21.03.x/21.03.1/#tag/Video/paths/~1v1~1video.web/get
When making the connection to the camera, we also request the stream be low resolution (416x416 pixels ideally) to effectively blur faces.
We stream the video into an AODC and drop each frame from memory after ML inference has been done to extract bounding boxes/tracks.”
The systems they work with are currently on Exacq but they are looking to connect to specific cameras on some of our Milestone recording servers.
Overall I am looking to see the following:
- Overall requirements
- Does the API need to be installed on the Management server? Or just the recording server?
- Validate user permissions
- Basic vs Domain user account
- Syntax to accomplish this in Milestone
- Any other things we should be aware of
The API Gateway is automatically installed or rather it is part of the overall installer for XProtect.
https://doc.milestonesys.com/2022R2/en-US/standard_features/apigateway/installation/api_gway_install-api-gateway.htm?Highlight=api%20gateway%20install
I recommend you review here how to log in.
https://doc.developer.milestonesys.com/mipvmsapi/#section/Introduction/Get-started
Right now the API Gateway does enable you to configure XProtect, but not to request an image or a stream.
There are a lot of ways to request an image from XProtect. What I believe comes closest to what you describe is not in the MIP SDK but is RTSP as included in the Open Network Bridge add-on server product.
https://www.milestonesys.com/support/resources/download-software/?prod=1373&type=13&lang=27
Thank you for the reply. Is this a feature that the API Gateway will support in the future?
For the Open Network Bridge, what would be the process to acquire the stream?
API Gateway will be extended, it is the plan to gradually extend it for all the functionality beyond the configuration that it supports today.
API Gateway will in 2023R1 support fetching live video using WebRTC (in 2022R3 there is a prerelease if you want to explore this now).
What methods to fetch video will be supported beyond that in the future is to my knowledge not planned, the final architecture or functionality is not a firm plan.
Please note that there are other ways to fetch video that have been supported long time. There are samples in the MIP SDK you can use to explore the existing methods.
For the Open Network Bridge I would like to refer to the documentation explaining this, please see “Use a media player to view a video stream”- https://doc.milestonesys.com/latest/en-US/standard_features/sf_onvifbridge/onvif_usingonvifclientstovi.htm?tocpath=Third-party%20integrations%7CMilestone%20Open%20Network%20Bridge%7COperation%7C_____1