You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close

API Tip: Finding a Camera ID

API Tip: Finding a camera Id

------------------------- 
Affected Roles: Administrator
Related Digital Watchdog VMS Apps: DW Spectrum Server
Complexity: Medium

Software Version:

Firmware Version:

Created By;

Date Created: 10/11/2019
------------------------- 

Article Heading: API Tip: Finding a camera Id

The DW Spectrum Server API allows developers to interact extensively with the DW Spectrum Server and can be found in the DW Spectrum Web Admin Interface. In this guide, we'll show you how to find the camera Id - useful for anytime you want to utilize live or recorded video from a camera or cameras in your DW Spectrum System.

How to find the camera Id:

Since DW Spectrum 3.0 every any camera Id can be found in DW Spectrum Client:

  • Right-click on a camera and select Camera Settings
  • Click on the Advanced tab you'll find cameraId field with necessary value

Get cameraId using an API request:

  1. In your browser type the following HTTP request:

    http://<server_ip>:<server_port>/ec2/getCamerasEx?extraFormatting

    server_ip
     = the IP address or URL of the DW Spectrum Server you are requesting this information from. 
    server_port = the port your System is using (typically 7001)

    For example, if you were placing an API call to our DW Spectrum Demo System the call would be: 
    http://100.32.247.140:7001/ec2/getCamerasEx?extraFormatting

    * Important note: when making an API call you can use any Server in the System.

     
  2. You should now see something similar to the following screenshot:

    https://support.networkoptix.com/hc/en-us/article_attachments/210515167/Get_CameraID.PNG

     
  3. Search the page (CTRL + F) and enter the name of the camera you are searching for using the camera name in your System. e.g. "Cube". Also camera IP address might be used for the search.

    Located above the camera name you will notice a parameter called "id". This attribute value is cameraId that should be put to different API calls(ptz, hls, rtsp, etc.). Value should be used without quotation marks with/without parenthesis. I.e., in this case you paste {0b73e6d1-a5d3-2868-41c7-b52994f4107d} to your API call as a parameter.

  • 74
  • 28-Sep-2020
  • 2395 Views