Notification Channels
The following notification channels can currently be supported:
email
: notifications will be delivered to the email address of the user.PUSH
: notifications will be delivered as a mobile PUSH notification to the user.inbox
: notifications will be delivered to the in-app inbox of the user.REST API
: notifications will be sent directly to the customer's REST API to be managed accordingly. More information can be found here.
Enabling & disabling a notification channel
All Notification Channels (except for inbox
notifications) are disabled by default in EnergyAI unless defined as described in the Prerequisites section. To start receiving notifications on a channel the end user will have to give their consent.
- To allow end users to give their consent and start receiving notifications on a certain channel the CE API provides the /notification/channel/enable endpoint.
- Accordingly the /notification/channel/disable endpoint is used to disable a channel.
Push notifications can be enabled for multiple devices on the same account.
To do so a request to the Enable notification channel should be made on each individual device.
Configurations of enable/disable are on device level!
Support for multiple apps.
NET2GRID supports multiple applications that can be used to receive notifications. This is useful for sandbox applications that can be used separately to test the app prior to releasing the app.
The
app_identifier
field in the Enable notification channel endpoint identifies this specific app.
Get current notification channel state
To verify if a particular notification channel is enabled or disabled for the current user the CE API provides the Check Channel Status endpoint:
A successful call to this endpoint will result in a response similar to:
{
"status": "ok",
"data": {
"enabled": true,
"mutedTopics": [
"HYPERACTIVE_ALARM"
]
}
}
The enabled
parameter indicates if the notification channel is enabled or not. The mutedTopics
parameter contains an array of topics the user muted. Topics are explained in detail in the Topics page.
Updated 29 days ago