HTTP Request-as-an-Action
-----------------------------------
Affected Roles: Administrator, Power Users
Related Digital Watchdog VMS Apps: DW Spectrum
Software Version: 6.0
Last Edit: April 15, 2025
-----------------------------------
What is an HTTP Request-as-an-Action?
HTTP Request as an Action is a feature of DW Spectrum that allows users to create an event rule that will send an HTTP POST or GET request over the network to a specific service or device. This allows DW Spectrum to send alerts to third party systems or devices, which can be used in those devices or systems to trigger additional actions.
This article will outline how to use HTTP Request-as-an-Action and an example scenario for this method.
How to Use HTTP-Request-as-an-Action
Using DW Spectrum Client, log in as an Administrator or as a Power User and perform the following actions:
- In DW Spectrum, open the System Administration menu (CTRL+ALT+A).
- Open the Event Rules menu and click the Add button.
- Configure the Event section of the rule as desired.
- In the Action section, select “HTTP Request” as the Do function.
- Select your Interval of Action.
- In the HTTP(S) URL field, enter the listen endpoint for the request. This can also contain the request itself.
- In the Login and Password fields, enter any login credentials that may be needed for authenticating with the device or service that the HTTP Request is being sent to. This supports Basic and Digest authentication.
- In HTTP Request, 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.
- Click the Apply or OK button to save the rule.
Example Scenario Using HTTP Request
This example sends an API request to the click-and-call system to send an SMS message to a specific phone number. It can be coupled 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".
For More Information or Technical Support
DW Technical Support: 866.446.3595 (option 4)
https://www.digital-watchdog.com/contact-tech-support/
______________________________________________________________________________
DW Sales: 866.446.3595 [email protected] www.digital-watchdog.com