Read and write to Milestone database

Hi! I am new to Milestone, but have been asked to develop a existing Windows service that currently makes MS SQL queries (read and write) to the customers Milestone database. But now the customer want the Windows service to do these queries throw the Milestone SDK. Where should I start to learn how to do this, and is it even possible?

Configuration data is stored in the SQL Database. There is a RestAPI and there is a Configuration API.

Some links..

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

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/configapiclient/readme.html&tree=tree_2.html

https://doc.developer.milestonesys.com/html/index.html?base=reference/protocols/api-gateway.html&tree=tree_3.html

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/configaddcameras/readme.html&tree=tree_2.html

I am not sure if the table is part of the default tables in Milestone database. The table was originally named LPR.LicensePlates and LPR.LicensePlateLists but something in the Milestone system changed the tables to LPR.MatchLists, and LPR.MatchListItems. The service need to detect if Milestone changes name on the tables and adapt for it.

This is a good example why you should never access the database directly. The database is not documented and there is no support for using it directly. This means that Milestone can (and sometimes will) change the database without notice.

I found this in “Introduction to MIP SDK 2019 R1”

Configuration API

  • It is now possible to manage LPR match lists in the Milestone XProtect LPR product. Match lists can be created, deleted, read and edited through the Configuration API. Please see the MIP SDK documentation on the Configuration API and the new ConfigurationItems.LprMatchList class for further details.

Ref. https://doc.developer.milestonesys.com/html/index.html?base=gettingstarte/mip2019r1_intro.html&tree=tree_search.html?search=lpr

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

I’d like to rephrase "The service need to detect if Milestone changes name on the tables and adapt for it. " to “The service needs to continue to work no matter what Milestone might change in the underlying functionality in the VMS.” I hope you can agree and don’t feel I have gone too far in trying to recommend the SDK over unsupported direct access to the SQL database.

Thanks, I preciate it! I will look into the Configuration API.