Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Product style icon link REST API connection

External devices use the REST API connection to communicate with the Octalarm alarm dialler.

Good to know: You must add a REST API connection in the dialler for each external device. The Octalarm alarm dialler supports multiple REST API connections, each with its own unique token. Copy this token to the external device you wish to connect.

Adding REST API connection(s)

Good to know: Add a REST API connection via Remote setup. For more information, see The portal: portal.octalarm.com and Remote setup (local).

  • Open Settings.
  • Select Octalarm Link in the navigation menu.
  • Click Edit.
  • Click Add.
  • Enter a clear name for the connection that indicates the linked process computer.
  • Click Add.
  • Repeat the 3 bullets above to connect multiple external devices.
  • Click Back to exit the menu.

Requesting and using a token

The token provides access for your external device to the alarm dialler's REST API. You use this token for:

  • testing the connection in an OpenAPI (Swagger) tool;
  • setting up the connection on your external device.

Request the token as follows:

  • Click the info button (i) next to the connection.
  • Click Copy token to clipboard.
  • Click Close.

Testing with an OpenAPI (Swagger) tool

  • In the authorisation screen, at Value, type Bearer followed by a space and paste the copied token.
  • Click Authorise.

Screenshot available authorisation

Connecting your external device

Follow the process computer manufacturer's instructions and copy the token to your external device.

Modifying or removing a REST API connection

  • Open Settings.
  • Select Octalarm Link in the navigation menu.
  • Click Edit.
    1. To change the name or generate a new token, use the pencil icon (nav-edit icon).
    2. To remove a connection you no longer need, use the waste bin icon (delete icon).
  • Click Back to exit the menu.

Note: If you remove a connection, you also delete all associated settings for its REST API.

Setting up a watchdog mechanism

Set up a watchdog mechanism to monitor the connection between the external device and the Octalarm alarm dialler.

POST: /Interface/Watchdog

{
  "next_kick_before_secs": 60
}

cURL code:

curl -X 'POST' \
  'http://192.168.10.72/rest_api/1/Interface/Watchdog' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MTI1MzQ0ODgsIm5iZiI6MTYxMjUzNDQ4OCwianRpIjoiNjY0NzI2NzAtYTRkMi00N2ZmLWFiMjUtNzAyMGYwOTkwNWJhIiwiZXhwIjoxNjEyNTM3OTg4LCJpZGVudGl0eSI6IlJFU1QtQVBJXzAwMDUiLCJmcmVzaCI6ZmFsc2UsInR5cGUiOiJhY2Nlc3MiLCJ1c2VyX2NsYWltcyI6eyJ1c2VyX2lkIjo1LCJyb2xlX2lkIjo1LCJsYW5ndWFnZSI6Im5sLU5MIn19.6xlCrMjNsKd9Eyq5ieS-MScZe6P1idstMCKPs5dfOd8' \
  -H 'Content-Type: application/json' \
  -d '{
  "next_kick_before_secs": 60
}'

Response:

{
  "next_kick_before_secs": 60
}

Note: If you do not send a new watchdog request within the specified time, the Octalarm alarm dialler triggers a system failure.