evalinkdocs

Incoming webhooks

Let any external system, script or person create alarms on a site by calling a web address.

What an incoming webhook is

An incoming webhook is a unique web address for one site. When a system calls it, evalink talos creates an alarm on the site. The alarm uses the code and zone you set on the webhook, unless the caller sends its own values. Use webhooks for systems that have no dedicated integration but can call a URL.

Each webhook has two endpoints:

  • the machine endpoint, for systems; it accepts GET and POST, with values as URL parameters or a JSON body,
  • the web endpoint, a simple page where a person can trigger the alarm in a browser.

A periodic webhook works the other way round: it raises an alarm when it is not called in time. See Make a webhook periodic.

Turn on webhooks for your company

To turn on webhooks, go to Company and open the Integrations tab.

  1. On the Webhooks card, click Add Integration.
  2. Leave Integration Enabled on and save.

Each site now has an Incoming Webhooks sub-tab on its Integrations tab. Webhooks aren't a premium feature.

Create a webhook

To create a webhook, go to Sites and open the site.

  1. Open the Integrations tab and the Incoming Webhooks sub-tab.
  2. Click Create Webhook.
  3. On the General tab, enter a Name and the Alarm Code. If you like, enter an Alarm Zone.
  4. Select Technical, Test Message or Restore if the webhook should create that kind of alarm.
  5. To protect the webhook, switch on Authentication and enter a Username and Password. Callers must then send them as Basic authentication.
  6. Save.

The webhook appears as a card. Click Copy Machine Endpoint or Copy Web Endpoint and give the address to whoever calls it. The card also shows Last Invocation.

Make a webhook periodic

A periodic webhook supervises a system that should call regularly.

  1. When you create the webhook, switch on Periodic Invocation. You can't change this later.
  2. In Invocation Interval, enter the time after which an alarm is raised if no call arrives (HH:mm:ss, default 00:05:00).
  3. If you like, enter an Alarm Code for Restore, sent when the webhook is called again after a timeout.
  4. Select Start Timer Immediately to start the timer without waiting for the first call.

Every call restarts the timer. The card shows "Periodic, every …" and Next Alarm at. A periodic webhook has only a machine endpoint.

Map the caller's data to alarm fields

If the caller's data doesn't use evalink talos field names, use the Dynamic Templates tab of the webhook dialog. For each alarm field, such as Alarm Code, Alarm Zone, Partition ID, User name or Alarm message, enter a template that reads the value from the request body, a URL parameter or a header. The tab shows examples. Click Add Alarm Header to add your own alarm headers.

If a template can't be read, the error text becomes the field's value. Test new templates with a sample call.

Templates don't apply to restore alarms.

Turn off, edit, export or delete a webhook

To manage a webhook, go to the site's Incoming Webhooks sub-tab.

  • Use the switch on the card to turn the webhook off or on. A disabled webhook rejects calls.
  • Click Edit to change it.
  • Click Export to save it as a JSON file. Click Import to create a webhook from such a file, for example on another site.
  • Click Delete and confirm in Delete Incoming Webhook.

Creating, importing and changing webhooks needs the permission to change integration resources.

The Sitasys XML Standard card

The Sitasys XML Standard card forwards alarms to monitoring station software over the Sitasys XML protocol. Its dialog shows the Endpoint, Username and Password the station's software connects with. This integration is legacy and is a premium feature. For new connections, use the Alarm Dispatcher; see Forwarding alarms with the Alarm Dispatcher.