What is an 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. HTTP requests can be used with Generic Events as described in the example below.
How to use HTTP Request as-an-action?
- Within Nx Witness, click the upper left menu icon and select System Administration.
- Select Event Rules.
- 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.
- Choose your Interval of Action.
- In HTTP URL enter the listen endpoint for the request. This can also contain the request itself.
- 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. Below are some of the variables that you can use in your request.
-
For Analytics Events:
{event.source} — Will be replaced by the content in the "Source contains" field.
{event.caption} — Will be replaced by the content in the "Caption contains" field.
{event.cameraId} — Will be replaced by an ID of a camera which has fired the trigger
{event.cameraName} — Will be replaced by a name of a camera which has fired the trigger
{event.eventType} — Will be replaced by the selected event type (using the dropdown list next to "Event Type").
{event.eventName} — Will be replaced by the object or line name.
{event.description} — Will be replaced by the content in the "Description contains" field.
-
For Generic Events:
{event.source} — Will be replaced by the content in the "Source contains" field.
{event.caption} — Will be replaced by the content in the "Caption contains" field.
{event.description} — Will be replaced by the content in the "Description contains" field.
-
For Analytics Events:
- Press Ok and Save to save the Rule.
Example scenario using HTTP Request
This example sends an API request to the clickandcall system to send an SMS message to the phone number you specify. It could be coupled, for example, with a generic event that can trigger a 3rd party device to unlock the front door.
http://123.12.8.1:7001/api.clickandcall.com/http/sendmsg?user=DarthVader&password=123456&api_id=3612726$MO=1&from-13234567890&to=18184493546$text=Visitor+is+outside+front+door
- sendmsg — Sends data to a server at IP Address 123.12.8.1 port 7001
- user and password — credentials required by the receiver to allow the request access to their system.
- api_id — required account number with receiving entity.
- from — phone number from which the message will be sent.
- to — phone number to which the message is sent.
- text — the message text, in this case "Visitor is outside the front door".
Comments
0 comments
Article is closed for comments.