Skip to main content

configureNotificationsSettings

This method configures the notification settings for a given user account.

Parameters

Parameter

Type

Optional

Description

accountId

String

Yes

The ID of the account for which the notification settings are configured. If no value is provided, the settings will be applied to the account which generated the API key.

deleteAfter

Number

Yes

The number of days after which generated notifications will be automatically deleted. Valid values are between 1 and 365. The default value is 30 days.

emailAddresses

Array

Yes

A list of additional email addresses to be used when sending notifications.

includeDeviceName

Boolean

Yes

This option specifies whether the device name will be included in the notification sent by email, when it is available, or not. The value should be True to include the device name respectively False to not include it. The default value is False.

includeDeviceFQDN

Boolean

Yes

This option specifies whether the FQDN will be included in the notification sent by email, when it is available, or not. The value should be True to include the FQDN respectively False to not include it. The default value is False.

notificationsSettings

Array

Yes

A list of objects containing the notification settings to be configured. Only the specified notifications will be updated. Existing values are preserved for omitted settings. Each object should have the following structure:

sendOnlyPlainTextEmail

Boolean

Yes

This option specifies whether notification emails should be sent in plain text only. The value should be True to send emails in plain text, or False if you want to use HTML format.

Return value

This method returns a Boolean which is True if the notifications settings have been successfully configured.

Example

Request

{
       "params": {
           "accountId": "55896b87b7894d0f367b23c8",
           "deleteAfter": 17,
           "includeDeviceName": true,
           "includeDeviceFQDN": true,
           "emailAddresses": ["[email protected]"],
           "notificationsSettings":[
               {
                   "type" : 1,
                   "enabled" : true,
                   "visibilitySettings" : {
                       "sendPerEmail" : true,
                       "showInConsole" : true,
                       "useCustomEmailDistribution": false,
                       "emails" : ["[email protected]"],
                   },
                   "configurationSettings" : {
                       "threshold" : 15,
                       "useThreshold" : true
                   }
               }
           ],
           "sendOnlyPlainTextEmail": true
       },
       "jsonrpc": "2.0",
       "method": "configureNotificationsSettings",
       "id": "5399c9b5-0b46-45e4-81aa-889952433d68"
  }

Response

  {
      "id":"5399c9b5-0b46-45e4-81aa-889952433d68",
      "jsonrpc":"2.0",
      "result": true
  }