Applies to: WAVE
Summary:
The Do HTTP(s) Request feature in WAVE allows users to create rules that send an HTTP POST, PUT, DELETE or GET request to targeted external devices in response to any event triggered in WAVE. This functionality enables WAVE to send alerts and initiate actions in those systems or devices. This article provides instructions for using the Do HTTP(s) Request feature.
Step By Step Guide:
To use the Do HTTP(s) request feature in WAVE:
- Log in to WAVE and press CTRL+ALT+A.
- From the General tab, click Event Rules.
- Click the Add button to create a new rule.
- In the Event section, configure your rule as you normally would for your targeted event or device.
- In the Action section, select Do HTTP(S) request from the Do dropdown menu, then enter 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 HTTP(S) Content field, enter the body of the POST request.
- In the Login and Password fields, enter any credentials to authenticate with the device or service you are sending the HTTP request to (supports basic and digest authentication).
- Press OK and Save to save the Rule.
Variables
Following are some of the variables that you can use in your request:
For Analytic Events:
- {event.cameraId} — Will be replaced with the Camera ID defined in the Analytics Event.
- {event.cameraName} — Will be replaced with the selected camera's name defined in the Analytics Event.
- {event.eventType} — Will be replaced with the selected Event Type defined in the Analytics Event.
- {event.eventName} — Will be replaced with an object or line name in an Analytics Event.
For Generics Events:
- {event.caption} — Will be replaced with Caption contains in a Generic Event.
- {event.description} — Will be replaced with Description contains in a Generic Event.
Example
The following 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".