createOrgAlarmTemplate

POST https://{{host}}/api/v1/orgs/:org_id/alarmtemplates

Available rules can be found in Orgs>Consts>getAlarmDefs

The delivery dict is only required if different from the template delivery settings.

Body Parameters

ParameterTypeDescription
org_idstringpath
namestringSome string to name the alarm template
deliveryobjectDelivery object to configure the alarm delivery
rulesobjectAlarm Rules object to configure the individual alarm keys/types

Delivery Parameters

ParameterTypeDescription
enabledbooleanWhether to enable the alarm delivery via emails or not
toorgadminsbooleanWhether to deliver the alarms via emails to Org admins or not
tositeadminsbooleanWhether to deliver the alarms via emails to Site admins or not
additional_emailslistList of additional email string to deliver the alarms via emails

Rules Parameters

ParameterTypeDescription
objectObject to configure an individual Alarm (e.g. switch_down, device_down, device_restarted etc.)
enabledbooleanWhether to enable a particular alarm or not
deliveryobjectPer-alarm specific delivery configuration object (required if configuration must be different than the Alarm Template level delivery object)

Request Body

{"name"=>"Global", "delivery"=>{"enabled"=>false, "to_org_admins"=>true, "to_site_admins"=>true}, "rules"=>{"switch_down"=>{"enabled"=>true}, "device_down"=>{"enabled"=>true, "delivery"=>{"enabled"=>false, "to_org_admins"=>true, "to_site_admins"=>true}}}}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring
X-CSRFTokenstring
Content-Typestring

RESPONSES

status: OK

{"id":"684dfc5c-fe77-2290-eb1d-ef3d677fe168","name":"Global","delivery":{"enabled":false,"to_org_admins":true,"to_site_admins":true,"additional_emails":[]},"rules":{"switch_down":{"enabled":true},"device_down":{"enabled":true,"delivery":{"enabled":false,"to_org_admins":true,"to_site_admins":true,"additional_emails":[]}}}}