获取通知设置
该方法返回通知设置。
参数
|
参数 |
类型 |
可选 |
描述 |
|---|---|---|---|
|
|
字符串 |
是 |
要获取通知设置的账户ID。若未提供,则方法将返回生成API密钥的账户的通知设置。 |
返回值
此方法返回包含当前通知设置的对象:
-
deleteAfter- 生成的通知将自动删除的天数 -
includeDeviceName- 布尔值,指示设备名称是否包含在通过电子邮件发送的通知中 -
includeDeviceFQDN- 布尔值,指示设备FQDN是否包含在通过电子邮件发送的通知中 -
emailAddresses- 发送通知时使用的额外电子邮件地址列表 -
notificationsSettings- 包含所有可用通知设置的列表。列表中每个条目包含以下字段:-
type,通知类型, -
enabled,True若通知已启用,False否则, -
visibilitySettings,包含已配置可见性设置的对象。更多信息请参阅 通知可见性选项 . -
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"
}