Milestone Integration Platform (MIP) VMS API – REST API – Pre-release for XProtect 2021 R2

As announced at the Developer Conference 2021, you can now access the Milestone Integration Platform via a REST API.

It is available as a pre-release for the first version of the MIP VMS API.

A few highlights from the presentation:

The VMS API pre-release contains a REST API for the configuration of XProtect. It provides access to functionality similar to what’s in the current Configuration API.

The REST-based protocol uses http and JSON and is easy to access from programming languages such as Python and JavaScript, .NET Core, and Linux environments.

Authentication will be OAuth2 (OpenID Connect) based, with the XProtect IDP as the first supported identity provider.

The REST API is documented based on:

· An OpenAPI definition (same as a Swagger specification file). This file can be used by tools like proxy code generators and IntelliSense.

· A human-readable documentation

With this pre-release, you can start developing for and testing the REST API already from today. The final release, which is planned for 2022 R1, will update the installation so that it can be used in production environments.

Resources

Gateway installer:​

The pre-release contains an XProtect API Gateway installer. The API Gateway must, for now, be installed on the same machine as where the XProtect VMS 2021 R2​ Management Server is installed and runs.

When the API Gateway is installed, it can be reached at the https://{host}/api/rest/v1 endpoint, where the different resources can be addressed, like https://localhost/api/rest/v1/cameras Look in the documentation for other resources, like recordingservers or basicusers.

Download the Installer from here: https://download.milestonesys.com/ApiGateway/XProtectAPIGateway2021R2Installer.exe

OpenAPI Definition YAML file:​ https://download.milestonesys.com/ApiGateway/openapi.yaml

Documentation:​ https://doc.developer.milestonesys.com/mipvmsapi/

​Samples, incl. the demo presented at DevCon2021:​ https://download.milestonesys.com/ApiGateway/ApiGatewaySamples.zip

Feel free to comment and ask questions below!

I had a quick go at generating an API client using autorest this evening. I’m not really familiar with the tool or the openapi yaml format but it fails with a “Error: Name is empty!” error followed by “Error: Plugin pre-namer reported failure.”.

Here’s the full terminal output. The input was based on the openapi.yaml file linked in the OP.

https://pastebin.com/Mkh5W3vc

There were some parts of the original openapi.yaml that were incorrect. In the final version released with the 2022 R1 this was fixed. It can be downloaded from here: https://download.milestonesys.com/ApiGateway/openapi.yaml

Please note that with the 2022 R1 release, the XProtect API Gateway is an integrated part of the VMS. This first version includes a REST API for accessing and modifying the configuration of the VMS (similar to what is known from the Configuration API).