getNotificationsSettings
This method returns the notifications settings.
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
| 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 deletedincludeDeviceName
- a boolean that informs whether the device name will be included in the notification sent by email or notincludeDeviceFQDN
- a boolean that informs whether the device FQDN will be included in the notification sent by email or notemailAddresses
- the list of additional email addresses to be used when sending notificationsnotificationsSettings
- the list containing the settings for all available notifications. Each entry in the list has the following fields:type
, the notification type,enabled
,True
if the notification is enabled,False
otherwise,visibilitySettings
, an object containing the configured visibility settings. For more information, refer to Notifications Visibility Options.configurationSettings
, notification specific configurations. For more information, refer to Relation Between Notification Type and configurationSettings.sendOnlyPlainTextEmail
, specifies whether notification emails should be sent in plain text only. Possible values:True
to send emails in plain text, orFalse
if you want to use HTML format.
Example
Request
{ "params": { "accountId": "55896b87b7894d0f367b23c8" }, "jsonrpc": "2.0", "method": "getNotificationsSettings", "id": "5399c9b5-0b46-45e4-81aa-889952433d86" }
Response
{ "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]"], "logToServer" : true "logToServer" : true, "setCustomEmailSubject": true, "emailSubject": "Malware Outbreak Custom" }, "configurationSettings" : { "threshold" : 15, "useThreshold" : true } } ], "sendOnlyPlainTextEmail": true }, "jsonrpc": "2.0", "method": "configureNotificationsSettings", "id": "5399c9b5-0b46-45e4-81aa-889952433d68" }