详情
GET/message/alert/rule
规则详情,返回规则主体 + 有序 conditions + 关联渠道 channels。规则不存在时返回“规则不存在”。
请求
参数
类型
响应
规则主体字段同分页查询中的 MessageAlertRuleItem(不含 channelCount),另含:
- conditions:匹配条件数组,按
sort升序,单项结构:
参数
类型
- channels:关联渠道数组(无顺序语义),单项结构:
参数
类型
响应示例:
{
"id": 1,
"name": "定时任务失败告警",
"enabled": 1,
"logic": "and",
"categories": "cron",
"types": "error",
"conditions": [
{ "id": 1, "messageAlertRuleId": 1, "mode": "simple", "field": "title", "operator": "include", "value": "失败", "sort": 0 }
],
"channels": [
{ "id": 2, "channelId": 3, "name": "我的微信推送", "type": "wxpusher" }
]
}
