-------------------------
Affected Roles: System Owner • System Administrator • Advanced Viewer
Related Nx VMS Apps: Nx Desktop
Complexity: Low
-------------------------
The Nx Server API allows developers to interact extensively with the Nx Server and can be found in the Nx Web Admin Interface. In this guide we'll show you how to find the cameraId/physicalId - useful for anytime you want to utilize live or recorded video from a camera or cameras in your Nx Witness System.
How to find the cameraId:
Since Nx 3.0 every any cameraIdcan be found in Nx 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:
- 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 Nx 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 Nx Demo System the call would be: http://demo.networkoptix.com:7001/ec2/getCamerasEx?extraFormatting
* Important note: when making an API call you can use any Server in the System. - You should now see something similar to the following screenshot:
- 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.
Get physicalId using an API request:
- 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 Nx 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 Nx Demo System the call would be: http://demo.networkoptix.com:7001/ec2/getCamerasEx?extraFormatting
* Important note: when making an API call you can use any Server in the System. - You should now see something similar to the following screenshot:
- 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. "Kitchen". Also camera IP address might be used for the search.
Located above the camera name you will notice a parameter called "physicalId". This attribute value is physicalId that will be the folder name for "recording" and the "smart motion index". In this case your physicalId is 00-1C-A6-01-6E-6E.
Comments
1 comment
It would be great if you added a static identifier handeled by NX so that we can set up API calls that still will work even if the physical camera is replaced.
When a camera is replaced this "NX channel identifier" should be moved to the new camera. This way all recordings and api calls can follow the "Channel" and not the physical camera.
Please sign in to leave a comment.