You can trigger the events (External Events - Predefined Events) Request Start Recording and Request Stop Recording.
On the protocol use EventTriggerWithMetadata
Note that using these events the rule: “Default Record on Request Rule” is used, and it is important to understand that you cannot stop recording that has been triggered by other rules - https://developer.milestonesys.com/s/article/About-start-and-stop-recording-in-MIP-SDK-c-library
If the task is rather to stop the hardware completely other methods should be used. WIth the Configuration API you can pick the hardware device and disable it, this will ensure you stop all communication not only with the camera but with the device as a whole including audio, I/O etc.
Thank you for your suggestions. Can you provide more information on how to use Configuration API to disable device.
Thanks
Run the Config API Client sample. This sample is not protocol but will give you information on the structure and use of the configuration API. Try in the sample to disable and enable a device.
You can do the same operations by using the configuration API as protocol. (ConfigurationAPIService.svc) The hard part might be to develop the code for login. Unfortunately there is no sample for this.
http://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_soap_protocols.html&tree=tree_3.html