What is Do HTTP Request (aka HTTP Request-as-an-Action)?
Do HTTP Request is a feature of Nx Witness that allows users to create a rule that sends an HTTP POST or GET request over the network to a targeted service or device. This allows Nx Witness to send alerts to 3rd party systems or devices, which can then be used in those devices or systems to trigger additional actions.
How to use HTTP Request as-an-action:
- Navigate to the Alarm/Event Rules Dialog.
- Click the Add button to create a new rule.
- Configure your rule as you normally would for your targeted Event or Device.
- In the Action column select Do HTTP request.
- Click the Advanced Button on the right top of the Alarm/Event Rules Dialog.
- Choose your Interval of Action.
- In HTTP URL enter the listen endpoint for the request.
- in Login and Password enter any credentials you may need for authenticating with the device or service you are sending the HTTP Request to. Supports Basic and Digest authentication.
- In HTTP Content enter the body of the POST request.
- Press Ok and Save to save the Rule.
Questions
If you have any questions related to this topic or you want to share your experience with other community members or our team, please visit and engage in our support community or reach out to your local reseller.
Comments
16 comments
I assume there was a specific request or usage scenario that inspired this feature. Could you list a few examples of how customers have used this?
I did see the Youtube clip showing Clickatell, but am assuming that might not be the only one.
Hi Jeff,
Thanks for your question.
The following are the use cases -
[ Use Case 1 ]
There is a restricted area in the factory, which is not allowed anyone enter it without permission.
The restricted area has a ACS card reader at the entry.
Cameras are installed monitor the area nearby.
One day, someone breaks the ACS reader, and enter the restricted area. Then Nx Witness detects the abnormal motion in the area, so Nx Witness trigger the actions:
Security guard is notified as Nx Witness detects the motion.
At the same time, Nx Witness sends a HTTP request/notification OUT to the Call center server, then call center runs the security procedure. (Phone call, Alarm,...)
Nx Witness sends a HTTP request/notification OUT, which can trigger the electronic locker to lock the entry.
Nx Witness tags a bookmark on the timeline and enable panic recording at the same time.
[ Use Case 2 ]
Nx Witness now supports Generic Events, meaning that we can let our users to define their own event with different content.
When the content is different(user can define the Caption, Description), so Nx can identify the events which are sent from different softwares, then Nx can transfer/relay the alarm or trigger different actions on corresponding 3rd party software.
Currently, Nx Witness can accept and send the HTTP requests or notifications from/to 3rd party softwares. So, in summary, this feature help to provide a bidirectional communication between Nx and other softwares.
May I ask what should I fill in the HTTP content? Thanks for your help!
I mean, should I include the header or just enter param=value?
Is it not possible to send to an endpoint using https ?
I get a message in NX telling me the event is not valid if I try to set it up with https
After some testing I found that it support https.
So the false warning is the only thing that needs to be fixed.
Hi Fredrik Ahlsen,
It is OK to send HTTP to an endpoint.
The reason you see rules is invalid means that -
1. One of your rules is wrong. It might be other rules , not his HTTP one.
2. You have not selected right device to provide the actions.
While you are configuring and saving the rules, it is required to make all rules in right way.
If you don't mind, please go our support ticket, issuing this problem, and provide the remtoe access to us.
We are glad to help to check.
Thanks.
Hello. Is there any way to use NX with POS or with LPR cameras?
Is there any way to pass the camera name in HTTP events? So if I want to send an event on motion to a third party system, do I need to make an event for each and every camera, or can I make one event and Nx Witness will send the camera name in the HTTP content field.
And if there are variables we can pass in events, is there a list somewhere? I might be blind but I didn't see it in any documentation.
Tim Tanner did you ever get a response?
Can we place variables int he Content that get filled in automatically? I.e. camera name/id ?
Hi Tim Tanner and Marc R,
My apologies for the huge delay in the response. We will change the process in order to reply more promptly.
By default, you cannot place variables in the content. If you would like to achieve this, it would require a 3rd party application.
I do the trigger by using the variable {event.description}, the endpoint will receive the event name, however, i couldn't find a way to show the rest of variables, for example, source name and source caption and etc
Revee,
May you elaborate what kind of operations you are trying to do, and what was the command you execute?
Maybe the detail of your URL would be good.
Thanks.
hi Ichiro,
Thanks for your reply. We are attempting to re-sending the alarm to the 3rd party platform via HTTP request, in the content body, we are trying to use variable value but it seems not working properly. Those variable values showing as text at the end point. Here is my setting page:
Hi Reeve,
Thanks for your information. However, you might misunderstand the feature.
Please check the release note of the v4.0.0 Nx Witness.
As a result, there is no {event.cameraId}, no {event.eventType}....etc.
Also, you need to guarantee the Event is from "Generic Event".
This function has not yet supported the Analytic event yet.
It is suggest you could check the section(bullet point) for this function in the release note.
Regarding support the analytic event passing the parameter, this is on the whshlist.
However, there is no ETA yet. If we have update, we will let you know.
Thanks.
Article is closed for comments.