What is Nx Witness Server API?
The Server API provides a standard set of HTTP calls for 3rd party systems. Using the Server API, developers have the ability to access nearly every feature available in the system's thick client, including but not limited to:
- query/manage system resources (servers, cameras, users)
- manage users and permissions
- pull live or recorded video out of the system
- generate events
- create rules
- control PTZ cameras, and more
How to use Nx Witness Server API?
Nx Witness provides documentation to help developers work with the Nx Witness Server. All parameters and expected returns are listed.
The APIs are all under the RESTFUL standard, so developers are able to simply interact with Nx Witness Server via HTTP using POST or GET requests. With the latest release, PUT, PATCH, and DELETE requests will also be possible. No matter which programming language you use, you can always retrieve the data and integrate your system with Nx Witness.
How to access the API Documentation?
Method 1
Navigate to the online REST API documentation through THIS link.
Method 2
If you have the latest Nx Meta (Client & Server) installed, you can access the new API, with the updated Swagger UI, by visiting the Web Admin (using the format below) and clicking on API Documentation at the bottom of the page.
http://<server_ip>:<server_port>
The API is divided into 3 main sections:
- Nx Witness VMS Server API — contains the new API calls.
- Nx Witness VMS Server legacy API — contains API calls from the previous versions that still work.
- Nx Witness VMS Server deprecated API — contains the deprecated API calls that may still work, but are not recommended for use.
Note: Some API calls may have been deprecated in this update. If you refer to the API calls under Nx Witness VMS Server deprecated API, the description in the deprecated calls will refer you to the new API calls to use that fulfill the same purpose; this will appear as text in the request description that says "Deprecated in favor of X", where "X" will be the new call.
Testing the API
To help our users get started with Nx Witness, we provide a simple tool for you to test the API and view readable return data.
- Open the Web Admin interface and visit the API trial page:
http://<server_ip>:<server_port>/static/index.html#/developers
- On the page, you will be able to find the “API Testing Tool (new)” under the Server API section.
Visual Example
- Click the link of “API Testing Tool (new)”. You will then see the list of all server APIs, and you could click any of them to test and try the API.
Visual Example
Comments
2 comments
Hi there,
I'm a new developer, trying to access and use the Nx API. After I've tried, I have many questions.
For example, in the topic "How to access API documents" section 2.Find the API documentation when you install Nx Server. I couldn't access any functions on the web. It's told me to fill ID, pass. I did it but I could not use any Navigation bar functions. It shows only a white page.
Next, it is I couldn't config my laptop camera via its Web Page "http://...." It shows "This page can not be reached "
This is my email: tritle129@hotmail.com
thankyou so much,
T
Hi Asadang,
My apologies for the delay in my response.
You wrote: ".... It shows only a white page...."
I assume you were using Chrome as a browser. In version 80 of Chrome a bug appeared which we resolved in 4.0.0.30434+. So please update your system to this version or newer or use another browser.
For developer related questions, please also check out our support community where you can engage with other users, developers, our support team and our developers directly.
Article is closed for comments.