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 Categories

Good to know: Are you working with MinimalConfig? The system will then add locations and categories automatically. You can skip this steps.

Note: Always check that the hardware and software are suitable before creating locations and categories. For the API methods, see version checks.

In practice, users often assign alarms to different call lists or service groups. Therefore, you typically create multiple categories to organise these assignments.

Description of API elements

ElementDescription
auto_repeat_delayDelay before an alarm repeats.
auto_repeat_timesNumber of repetitions after 1st alarm acceptance.
buzzerEnabling or disabling the buzzer for this alarm.
call_list_idID of the selected call list / service group.
category_idUnique generated ID for the category.
continue_after_restoreEnabling or disabling forwarding to the call list/service group after the alarm has been restored.
criticalEnabling or disabling the maximum app volume.
disabled_untilSwitch off alarm to UTC time stamp YYYY-MM-DDTHH:MM:SSZ.
enabledEnable or disable alarm notification for this category.
location_cat_seqCategory sequence number based on location.
location_custom_idUnique location ID defined by the customer; may be used instead of location_id.
location_idUnique generated ID for the location.
nameName for the category.
report_during_daytimeEnabling or disabling daytime alarm notification.
report_during_nighttimeEnabling or disabling nighttime alarm notification.
report_during_weekendEnabling or disabling weekend alarm notification.
topicUnique custom ID for the category.

Note: You cannot link a specific call list or service group to a category via the REST API. We recommend you use call_list_id 1 when creating a category.

Good to know: If you create specific call lists or service groups in the dialler, you can link them to a category.

  1. How toe create a call list or service group.

  2. How to link a call list to an input (category).

API methods

In the scenario of the practical example, there are 4 categories: Crop urgent, Crop non-urgent, Technically urgent and Technically non-urgent. To add categories, use the API POST: /Categories.

POST: /Categories

{
  "auto_repeat_delay": 300,
  "auto_repeat_times": 3,
  "buzzer": true,
  "call_list_id": 1,
  "continue_after_restore": false,
  "critical": true,
  "enabled": true,
  "location_custom_id": "loc_01",
  "name": "Cult. Urgent",
  "report_during_daytime": true,
  "report_during_nighttime": true,
  "report_during_weekend": true,
  "topic": "cultivation_urg"
}

cURL code:

curl -X 'POST' \
  'http://192.168.10.72/rest_api/1/Categories' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MTI1MzQ0ODgsIm5iZiI6MTYxMjUzNDQ4OCwianRpIjoiNjY0NzI2NzAtYTRkMi00N2ZmLWFiMjUtNzAyMGYwOTkwNWJhIiwiZXhwIjoxNjEyNTM3OTg4LCJpZGVudGl0eSI6IlJFU1QtQVBJXzAwMDUiLCJmcmVzaCI6ZmFsc2UsInR5cGUiOiJhY2Nlc3MiLCJ1c2VyX2NsYWltcyI6eyJ1c2VyX2lkIjo1LCJyb2xlX2lkIjo1LCJsYW5ndWFnZSI6Im5sLU5MIn19.6xlCrMjNsKd9Eyq5ieS-MScZe6P1idstMCKPs5dfOd8' \
  -H 'Content-Type: application/json' \
  -d '{
  "auto_repeat_delay": 300,
  "auto_repeat_times": 3,
  "buzzer": true,
  "call_list_id": 1,
  "continue_after_restore": false,
  "critical": true,
  "enabled": true,
  "location_custom_id": "loc_01",
  "name": "Cult. Urgent",
  "report_during_daytime": true,
  "report_during_nighttime": true,
  "report_during_weekend": true,
  "topic": "cultivation_urg"
}'

Response:

{
  "id": 35,
  "location_id": 3,
  "topic": "cultivation_urg",
  "enabled": true,
  "name": "Cult. Urgent",
  "report_during_daytime": true,
  "report_during_nighttime": true,
  "report_during_weekend": true,
  "continue_after_restore": false,
  "call_list_id": 1,
  "auto_repeat_times": 3,
  "auto_repeat_delay": 300,
  "buzzer": true,
  "critical": true,
  "location_custom_id": "loc_01"
}

After you have created the locations and categories, you can use the REST API for alarming. You can read more about the alarming process in Alarm reporting.