验证流转规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
请求语法
POST /routeRule/verify HTTP/1.1
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
body | object | 否 | 请求 body。 | |
routeRuleId | long | 否 | 规则 ID。 | 1111 |
testSourceEvents | array<object> | 否 | 告警测试内容。 | |
object | 否 | 告警测试内容。 | ||
monitorSourceId | long | 否 | 监控源 ID。 | 1 |
monitorSourceName | string | 否 | 监控源名称。 | zabbix |
eventTime | string | 否 | 告警时间。 | 2021-09-08 13:00:00 |
eventJson | string | 否 | 告警测试内容格式。 | {} |
{ "testSourceEvents": [ { "eventJson": "{\n\t"summary": "Cpu_util at 85.16% on machine 112.11.123.11",\n\t"priority": "P1",\n\t"name": "Cpu 使用超额预警",\n\t"timestamp": "2021-07-17 T08:42:58.315+0000",\n\t"region": "shanghai",\n\t"source": "112.11.123.11",\n\t"application": "zheda/mozi",\n\t"group": "线上",\n\t"class": "Load",\n\t"details": {\n\t\t"freeSpace": "1%",\n\t\t"pingTime": "1500ms",\n\t\t"loadAvg": "0.75"\n\t},\n\t"tags": "{}"\n}", "eventTime": "2021-12-17 05:13:17", "monitorSourceId": 23463, "monitorSourceName": "标准集成" } ], "routeRuleId": "160034020", "clientToken": "7e070585-ee11-450e-8827-db353faa3419" }
返回参数
{ "requestId": "gdgsdgsggsdg", "success": true, "errCode": 200, "errMessage": null, "data": { "routeRuleId": null, "isValidRule": false, "routeType": "INCIDENT", "routeRuleName": null, "assignToWhoName": null, "notifySubscriptions": [ { "subscriptionId": 80002030, "title": "【测试,勿动】全部服务" }, { "subscriptionId": 100000010, "title": "撒发色分" }, { "subscriptionId": 100000030, "title": "ceshi2190830" }, { "subscriptionId": 100000040, "title": "test121" }, { "subscriptionId": 100000070, "title": "是" }, { "subscriptionId": 110000000, "title": "全部服务-个人-优先级高" }, { "subscriptionId": 110000010, "title": "111" }, { "subscriptionId": 110000030, "title": "老数据兼容测试" }, { "subscriptionId": 110000090, "title": "测试优化功能" }, { "subscriptionId": 120000000, "title": "经 1" }, { "subscriptionId": 120000030, "title": "三级级联--全部服务" }, { "subscriptionId": 120000070, "title": "341" }, { "subscriptionId": 130000000, "title": "全部服务-服务组" }, { "subscriptionId": 130000010, "title": "222" }, { "subscriptionId": 130000030, "title": "ceshi0903" }, { "subscriptionId": 130000060, "title": "niidfads" }, { "subscriptionId": 130000070, "title": "e232" }, { "subscriptionId": 130000080, "title": "test0001" }, { "subscriptionId": 140000000, "title": "边界值测试" }, { "subscriptionId": 140000010, "title": "通知订阅啊" }, { "subscriptionId": 140000020, "title": "【不要乱动配置!!!】【新】通知订阅-全部" }, { "subscriptionId": 140000070, "title": "ceshiyixzia" }, { "subscriptionId": 150000000, "title": "24321" }, { "subscriptionId": 150000030, "title": "dscs" }, { "subscriptionId": 150000070, "title": "史蒂夫 v" }, { "subscriptionId": 150000090, "title": "121212" }, { "subscriptionId": 160000010, "title": "3333" }, { "subscriptionId": 160000030, "title": "wj 测试订阅" }, { "subscriptionId": 160000060, "title": "cdscds" }, { "subscriptionId": 160000070, "title": "ceshisd" }, { "subscriptionId": 170000000, "title": "服务--个人" }, { "subscriptionId": 170000010, "title": "4444444" }, { "subscriptionId": 170000020, "title": "测试 11" }, { "subscriptionId": 170000030, "title": "这是一个测试 0927" }, { "subscriptionId": 170000060, "title": "妖股仁东控股的背后操盘方景华,近日收到证监会的 500 万罚单。相关处罚决定书显示,这名昔日牛散在仁东控股上巨亏了近 27 亿,还向证监" }, { "subscriptionId": 170000070, "title": "吃" }, { "subscriptionId": 170000090, "title": "发发发" }, { "subscriptionId": 180000000, "title": "aa1" }, { "subscriptionId": 180000010, "title": "3" }, { "subscriptionId": 180000030, "title": "sdds" }, { "subscriptionId": 180000040, "title": "4fy" }, { "subscriptionId": 180000050, "title": "cadscds" }, { "subscriptionId": 180000060, "title": "sdc" }, { "subscriptionId": 180000090, "title": "速度" }, { "subscriptionId": 190000040, "title": "时间自定义配置测试" }, { "subscriptionId": 190000080, "title": "老数据兼容" }, { "subscriptionId": 190000090, "title": "当钉测试" } ], "escalationPlans": [], "routeRuleFailReason": [ "无告警内容匹配 Zabbix 这条规则" ], "monitorSourceIds": [ 23465 ] } }
示例
正常返回示例
JSON
格式
{
"requestId": "xxxxxx",
"data": {
"isValidRule": true,
"routeType": "INCIDENT、ALERT",
"notifySubscriptionNames": [
{
"subscriptionId": 111111,
"title": "订阅名称"
}
],
"escalationPlans": [
{
"escalationPlanName": "升级计划1",
"escalationPlanId": 111111
}
],
"routeRuleFailReason": [
"alertName不匹配"
],
"monitorSourceIds": [
0
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|