Skip to main content

CLOUD SOLUTIONS

getNotificationsSettings

This method returns the notifications settings.

Parameters

Parameter

Type

Optional

Description

accountId

String

Yes

The ID of the account for which the notifications settings are retrieved. If not provided, the method will retrieve the notifications settings for the account which has generated the API key.

Return value

This method returns an Object containing the current notifications settings:

  • deleteAfter - the number of days after which generated notifications will be automatically deleted

  • includeDeviceName - a boolean that informs whether the device name will be included in the notification sent by email or not

  • includeDeviceFQDN - a boolean that informs whether the device FQDN will be included in the notification sent by email or not

  • emailAddresses - the list of additional email addresses to be used when sending notifications

  • notificationsSettings - the list containing the settings for all available notifications. Each entry in the list has the following fields:

Example

Request

  {
       "params": {
           "accountId": "55896b87b7894d0f367b23c8"
       },
       "jsonrpc": "2.0",
       "method": "getNotificationsSettings",
       "id": "5399c9b5-0b46-45e4-81aa-889952433d86"
  }  

Response

  {
      "id":"5399c9b5-0b46-45e4-81aa-889952433d86",
      "jsonrpc":"2.0",
      "result": {
           "deleteAfter": 21,
           "includeDeviceName": true,
           "includeDeviceFQDN": false,
           "emailAddresses": [
               "example1@example.com",
               "example2@example.com"
           ],
           "notificationsSettings":[
               {
                   "type" : 1,
                   "enabled" : true,
                   "visibilitySettings" : {
                       "sendPerEmail" : true,
                       "showInConsole" : true,
                       "useCustomEmailDistribution": false
                       "emails" : []
                   },
                   "configurationSettings" : {
                       "threshold" : 5,
                       "useThreshold" : true
                   }
               },
               {
                   "type" : 3,
                   "enabled" : false,
                   "visibilitySettings" : {
                       "sendPerEmail" : true,
                       "showInConsole" : true,
                       "useCustomEmailDistribution": false
                       "emails" : [],
                       "logToServer" : true
                   }
               },
               ...
           ]
       }
  }