Notifications¶
A notification profile is a rule the server applies to fire alerts (SMS / email / webhook) when matching events occur. Profiles bind to event types and target Subscribers.
Quick reference¶
| Method | What it does |
|---|---|
client.notifications.list() |
All notification profiles in scope. |
client.notifications.list_types() |
The catalog of NotificationType (server-defined event taxonomies). |
client.notifications.create(name, *, notification_type='ALARM', **fields) |
Create a profile. |
client.notifications.update(uid, name, *, notification_type='ALARM', **fields) |
Full-replace update. |
client.notifications.delete(uid) |
Delete a profile. |
Reading and writing¶
# `name` and `notification_type` are required by the server;
# `notification_type` defaults to "ALARM" (the other value is "SYSTEM").
profile = client.notifications.create(
name="fall-alerts",
conditions={"zone_severity_level": 1, "alarm_type_list": ["zone_violation"]},
types={"email": True, "phone": False},
)
# update is a FULL REPLACE: re-send name + notification_type, and any
# fields you omit reset to server defaults. Disable via active=0.
client.notifications.update(profile.uid, name="fall-alerts", active=0)
client.notifications.delete(profile.uid)
name and notification_type are the two required fields (the SDK sends
notification_type="ALARM" by default and rejects any value other than
"ALARM" / "SYSTEM" before the request). The optional active,
conditions, and types fields all have server-side defaults. Because the
server validates updates with the same required schema and re-applies those
defaults, update is a full replace, not a partial patch — always
re-send name/notification_type and any conditions/types/active you
want to keep.
Subscribers are not attached here — bind them from the subscribers side
(subscribers.create / update with a notifications uid list).
Model — NotificationProfile¶
| Field | Type | Notes |
|---|---|---|
uid |
str |
Server-assigned. |
name |
str \| None |
Display name (required on write). |
notification_type |
str \| None |
"ALARM" or "SYSTEM" (required on write; server default "ALARM"). |
active |
int \| None |
Enable flag — 1 enabled, 0 disabled (server default 0). |
conditions |
dict \| None |
Match conditions: zone_severity_level (0–4) and alarm_type_list. |
types |
dict \| None |
Delivery channels: {"email": bool, "phone": bool}. |
Any further deployment-specific keys the server returns (e.g. project_uid,
timestamps) are preserved as passthrough attributes on .raw.
NotificationType (returned by list_types) has name and type.
Related entities¶
- Subscribers: Subscribers are the recipients. The link is owned by the subscriber side — a subscriber references its profiles by a
notificationsuid list.
See also¶
- Subscribers — how to manage recipients and their addresses.