Do HTTP Request

Navigation:  Working with DW Spectrum > Event Rules > Available Actions >

Do HTTP Request

Previous pageReturn to chapter overviewNext page

Sends an HTTP/HTTPS request to a targeted external device or system (floodlight switch, access control trigger, alarm system) which can then be used in those devices or systems to trigger additional actions. The request must follow the proper format in order to be read by the receiving device. HTTPS URLs are supported.

This action generates an HTTP GET, POST, PUT, or DELETE request in response to any event triggered in DW Spectrum. Together with the "Generic Event", which can receive an HTTP request as an event, you can create bidirectional API communication between DW Spectrum and other software systems.

For example, a manufacturer has a restricted area with an ACS card reader at the entry point and cameras that monitor the area surrounding the entry point. DW Spectrum has a standard rule to send a notification when abnormal duration motion is detected in the entry area. If someone tampers with the card reader in an unauthorized attempt to enter the restricted area, DW Spectrum triggers one action to notify the surveillance center that motion is detected in the area, and a second HTTP request action to the manufacturer's call center server, which in turn runs a security procedure to activate an alarm and generate a phone call to factory floor security personnel.

Example

http://123.12.8.1:7001/api.clickandcall.com/http/sendmsg?user=WitnessVMS&password=123456&api_id=3612726$MO=1&from-13234567890&to=18184493546$text=Visitor+is+outside+front+door.

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.

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 front door".

Basic Parameters

Interval of action – Check this box to aggregate the number of times the action will be triggered. Enter an integer and select a time interval from the menu (seconds, minutes, hours, or days). Uncheck to trigger the action every time the event occurs.

HTTP URL – The HTTP link to the external system that will receive the request. Can also contain the request itself.

HTTP Content – The body of the HTTP request, if needed. The following paramaters can be used to automatically be replaced by the appropriate fields:

For Analytics Events

o{event.cameraId} – Replaced by the selected camera's Camera ID.

o{event.cameraName} – Replaced by the selected camera's name (using the dropdown list next to "At").

o{event.eventType} – Replaced by the selected event type (using the dropdown list next to "Event Type").

o{event.eventName} – Replaced by the object or line name.

HTTP POST_Analytics Event

For Generic Events

o{event.source} Replaced by the content in the "Source contains" field.

o{event.caption} – Replaced by the content in the "Caption contains" field.

o{event.description} – Replaced by the content in the "Description contains" field.

HTTP POST_Generic Event

Login and Password – If required by the external system, enter credentials for authentication.

Content type – Enter the body of the request. Select from Auto, text/plain, text/html, application/html, application/json, or application/xml format according to the requirements of the receiving system. Auto selects the best format based on your entry.

Authentication type – Level of authentication required (Auto or Basic).

Request type – Type of request (Auto, GET, POST, PUT or DELETE).

Why Action may work incorrectly

Event is not configured properly.

HTTP request syntax is incorrect or does not meet receiver requirements.

External system requires authorization and no or incorrect credentials were specified.