getNotificationsSettings
该方法返回通知设置
参数
|
参数 |
类型 |
可选 |
描述 |
|---|---|---|---|
|
|
字符串 |
是 |
需获取通知设置的账户ID。若未提供,则返回API密钥生成账户的通知设置 |
返回值
该方法返回一个包含当前通知设置的对象:
-
deleteAfter- 生成的通知将在多少天后自动删除的天数 -
includeDeviceName- 布尔值,表示设备名称是否包含在通过电子邮件发送的通知中 -
includeDeviceFQDN- 布尔值,表示设备FQDN是否包含在通过电子邮件发送的通知中 -
emailAddresses- 发送通知时使用的附加电子邮件地址列表 -
notificationsSettings- 包含所有可用通知设置的列表。列表中的每个条目包含以下字段:-
type,通知类型, -
enabled,True如果通知已启用,False否则, -
visibilitySettings,包含已配置可见性设置的对象。更多信息请参阅 通知可见性选项 . -
configurationSettings,特定于通知的配置。更多信息请参阅 通知类型与configurationSettings的关系 . -
sendOnlyPlainTextEmail,指定通知邮件是否仅以纯文本形式发送。可能的值:True以纯文本形式发送邮件,或False若需使用HTML格式。
-
示例
请求
{
"params": {
"accountId": "55896b87b7894d0f367b23c8"
},
"jsonrpc": "2.0",
"method": "getNotificationsSettings",
"id": "5399c9b5-0b46-45e4-81aa-889952433d86"
}
响应
{
"params": {
"accountId": "55896b87b7894d0f367b23c8",
"deleteAfter": 17,
"includeDeviceName": true,
"includeDeviceFQDN": true,
"emailAddresses": ["example1@example.com"],
"notificationsSettings":[
{
"type" : 1,
"enabled" : true,
"visibilitySettings" : {
"sendPerEmail" : true,
"showInConsole" : true,
"useCustomEmailDistribution": false
"emails" : ["example2@example.com"],
"logToServer" : true
"logToServer" : true,
"setCustomEmailSubject": true,
"emailSubject": "恶意软件爆发自定义主题"
},
"configurationSettings" : {
"threshold" : 15,
"useThreshold" : true
}
}
],
"sendOnlyPlainTextEmail": true
},
"jsonrpc": "2.0",
"method": "configureNotificationsSettings",
"id": "5399c9b5-0b46-45e4-81aa-889952433d68"
}