告警与响应相关接口/告警通道与集成
PUTAlerting起始版本 1.0同步需要认证
保存告警SMTP配置
保存更新全局SMTP配置邮箱通知。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
hostString必填主机地址。
示例: smtp.example.com
portInteger必填端口号。
示例: 587
encryptionString必填模式无SSL starttls。
示例: starttls
usernameString必填用户名。
示例: alerts@example.com
passwordString必填密码。
示例: secret
响应状态
请求地址
PUT/api/v1/alerting/smtp-config
/api/v1/alerting/smtp-config
请求示例
curl -X PUT '{host}/api/v1/alerting/smtp-config' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"host":"smtp.example.com","port":587,"encryption":"starttls","username":"alerts@example.com","password":"secret","fromAddr":"alerts@example.com","fromName":"ZCF Alerts"}'
响应示例
200{
"host": "smtp.example.com",
"port": 587,
"encryption": "starttls",
"username": "alerts@example.com",
"fromAddr": "alerts@example.com",
"fromName": "ZCF Alerts",
"createDate": "example",
"lastOpDate": "example"
}变更历史
此 API 暂无变更历史记录。
