告警与响应相关接口/告警路由与策略
POSTAlerting起始版本 1.0同步需要认证
创建告警通知策略
创建新通知路由策略。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
nameString必填资源名称。
示例: Critical Alert Routing
descriptionString必填资源的详细描述。
示例: Route critical alerts to ops channels
priorityInteger必填优先级。
示例: 1
isDefaultBoolean必填是否默认捕获策略。
示例: false
matchersList必填标签匹配器路由决策。
示例: (nested array)
keyString键。
示例: severity
operatorString比较运算符。
示例: eq
valueString字段值。
示例: critical
响应状态
请求地址
POST/api/v1/alerting/notification-policies
/api/v1/alerting/notification-policies
请求示例
curl -X POST '{host}/api/v1/alerting/notification-policies' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Critical Alert Routing","description":"Route critical alerts to ops channels","priority":1,"isDefault":false,"matchers":"(nested array)","channelIds":"item1,item2","groupBy":"item1,item2","groupWait":30,"groupInterval":300,"repeatInterval":3600}'
响应示例
200{
"uuid": "policy-001",
"name": "Critical Alert Routing",
"description": "Route critical alerts to ops channels",
"priority": 1,
"isDefault": false,
"matchers": [
{}
],
"channelIds": [],
"groupBy": []
}变更历史
此 API 暂无变更历史记录。
