You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Home > DW Product Help > Software Applications > DW Spectrum IPVMS > API > How to start/stop the recording schedule of a specific camera via DW Spectrum Server API
How to start/stop the recording schedule of a specific camera via DW Spectrum Server API
print icon

Enable/Disable Recording via DW Spectrum Server API

DW Spectrum doesn't have direct API method to start or stop recording on certain cameras. But there is one called "saveCameraUserAttributes" that can change the additional attributes of a specific camera. So we can use this API to enable or disable the recording schedule; in other words, start/stop recording. (DW Spectrum Server API)

 

How To Steps:

  • Get the camera's full parameter list JSON through /ec2/getCamerasEx
  • Extract the parameter, id. (#Notice : Not physicalId.) Since 3.0 it's possible to get camera id directly from DW Spectrum Client. You can find it at "Camera Settings" -> "Advanced" tab.
  • Use the id as index, construct the JSON with required parameters of /ec2/saveCameraAttributes, you can refer to the API document.
  • Change the parameter - scheduledEnabled to enable/disable the recording of camera. True is enabled ;False is disabled.
  • Send POST request to DW Spectrum Media Server, using the API /ec2/saveCameraAttributes.

 

Authentication

All requests to the DW Spectrum Media Server are required provided correct user authentication. DW Spectrum Media Server supports HTTP basic and digest authentication.

  • Digest is more secured, workflow is described in the API documentation.
  • Basic is much simpler to use, just add user login and password to the link. 
scroll to top icon