Skip to content

Application Notification Preferences & APIs

Set notification preferences per application, including the authorization and preference APIs.

3 min read Updated SS

Requires an authorized API client with notification-preference access to the target account/application.

Setting Notification Preferences for an Application#

Confirm the installed API contract before sending a change#

This reference contains the earlier Severe/Default payload and IDs 295/296. Its general request table says POST while the notifications subsection says PUT. Ask the platform/API owner for the installed method and severity/notification IDs before sending a request to an MLT or L1–L7 deployment.

Before automating, obtain the installed endpoint, method, authentication requirements and allowed enums from the platform/API owner, and confirm the target account/application. Do not infer API IDs from UI labels or replace these values with threshold severity IDs. Keep a record of the existing preferences and use a reviewed request scoped to the intended application.

Until that contract is confirmed, use the supported Account Settings or personal notification preferences procedure for the task. After an approved API update, read back the same application preferences and verify delivery separately; a successful response alone does not prove a recipient received a message.

API Request Details#

API request must contain following:

SectionValue
MethodPOST
URLhttps://<HEAL_IP_HostName>:<HEAL_Port>/appsone-controlcenter/v2.0/api/<AccountIdentifier>/<API Name>
Request Header
AuthorizationGet the access token from HEAL Server. Mention client_id as ‘admin-cli’ and grant_type as ‘password’.
Command:
curl -X POST -d "client_id=<id>" -d "username=<HEAL_username>" -d "password=<HEAL_password>" -d "grant_type=<type>"
https://<HEAL_IP_HostName>:<HEAL_Port>/auth/realms/master/protocol/openid-connect/token
Example:
curl -X POST -d "client_id=admin-cli" -d "username=username" -d "password=<password>" -d "grant_type=password"
https://testservernode1:8443/auth/realms/master/protocol/openid-connect/token
Content TypeApplication/json

URL Details as follows:

  • HEAL_IP_Hostname: IP Address or the Hostname of the server where HEAL is installed.
  • HEAL_Port: Port number of the server where HEAL is running.
  • AccountIdentifier: Identifier of the Account being monitored. An Account Identifier is available in the Manage Accounts Screen of HEAL Control Center UI.

APIs#

1) To update notification preferences for an application, use the following API.

You can set user preferences at application level. Once you update the notification preferences, the application sets the new preferences as default notification preferences for a user assigned to the application. These are displayed in My Profile screen in HEAL UI.

API Name – notifications

Format – PUT /api/accounts/<account_identifier>/notifications

Attributes in Input JSON –

Type Name Description Mandatory /Optional
Body applicationId Identifier of an application. You can get it from appsone.controller table. Mandatory
Body signalTypeId Identifier of a signal type. You can get it from appsone.mst_subtype table. It can 297 or 298. Mandatory
Body signalType Type of a signal. It can be Problem or an Early Warning. You can get it from appsone.mst_subtype table. Mandatory
Body severityTypeId Identifier of the severity (Severe, Default). You can get it from appsone.mst_subtype table. It can be 295 or 296. Mandatory
Body severityType Type of the severity. It can be either Severe or Default. You can get it from appsone.mst_subtype table. Mandatory
Body notificationTypeId Identifier of the notification type. You can get it from appsone.mst_subtype table. It can have one of the following values:
Immediately (#291), If Open for long (#292), If Open for too long (#293), Off (#294)
Mandatory

Sample Request JSON –

[
    {
      "applicationId": 1,
      "signalTypeId": 297,
      "signalType": "Problem",
      "severityTypeId": 295,
      "severityType": "Severe",
      "notificationTypeId": 291
    },
   {
      "applicationId": 1,
      "signalTypeId": 298,
      "signalType": "Early Warning",
      "severityTypeId": 295,
      "severityType": "Severe",
      "notificationTypeId": 291
   },
   {
      "applicationId": 1,
      "signalTypeId": 297,
      "signalType": "Problem",
      "severityTypeId": 296,
      "severityType": "Default",
      "notificationTypeId": 291
   },
   {
      "applicationId": 1,
      "signalTypeId": 298,
      "signalType": "Early Warning",
      "severityTypeId": 296,
      "severityType": "Default",
      "notificationTypeId": 291
   }
]