For example, while continuously getting events from Milestone SDK (on programmatically subscribing to Milestone events), if there’s any network/power/Milestone server issues and the situation is restored back to normal in an hour, will we be able to get historical event data for that one hour?
Yes. The Alarm and Event Viewer sample shows how to read historical events.
Per default the server will however not save most of the events that happen! So in order to be able to read the events it might be required to change the setup.
In the Management Client - Tools - Options you find the “Alarm and Events” tab. Here you configure the system to save events that are otherwise not saved and you can set the wanted retention on the event storage.
A word of caution!
The saving of events is per default disabled for most events because the number of events can be very high, so enabling this can cause the SQL Server database to be overloaded and can cause very high storage requirements. Both the load and storage requirement can lead to a system that is not responsive as need be. Storage requirements can cause SQL Server Express (which is the one the XProtect comes with) to be inadequate and a higher version (and more expensive) SQL Server will be required. Do not save unneeded events, and do not keep them for longer than necessary. Monitor the usage of the SQL Server and load of the system services.