告警与响应相关接口/告警通道与集成
POSTAlerting起始版本 1.0同步需要认证
测试告警SMTP配置
测试SMTP连通性保存配置固定RI NI 01独立SMTP连通性测试。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
hostString必填主机地址。
示例: smtp.example.com
portInteger必填端口号。
示例: 587
usernameString必填用户名。
示例: alerts@example.com
passwordString必填密码。
示例: secret
encryptionString必填模式无SSL starttls。
示例: starttls
响应状态
请求地址
POST/api/v1/alerting/channels/smtp/test
/api/v1/alerting/channels/smtp/test
请求示例
curl -X POST '{host}/api/v1/alerting/channels/smtp/test' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"host":"smtp.example.com","port":587,"username":"alerts@example.com","password":"secret","encryption":"starttls","testRecipient":"ops@example.com"}'
响应示例
200{
"success": true,
"errorMessage": "authentication failed"
}变更历史
此 API 暂无变更历史记录。
