Product style icon link Categories

In practice, people often divide alarms between different call lists/service groups. That is why you create multiple categories.

API elements with their description

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 specific call lists/service groups to a category via the REST API. We recommend using call_list_id 1 when creating a category.

Good to know: by creating specific call lists/service groups in the dialler, you can then link them to a category.
1. Learn how to create a call list/service group
2. Read how to link a call list to an entry (category)

API methods

In the situation diagram, 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"
}