查看规则详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

POST /routeRule/detail HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
Object Body

body

routeRuleId Long Body 1

规则ID

clientToken String Body C4BE3837-1A13-413B-A225-2C88188E8A43

幂等号

{

"routeRuleId" : 1,

"}

返回数据

名称 类型 示例值 描述
requestId String 6B9347ED-FD93-42B4-B9A4-7282962F5D6A

请求ID

data Object

规则详情

routeRuleId Long 180000000

规则ID

ruleName String 规则1

流转规则名字

timeWindow Integer 3

时间窗口

relatedServiceName String 冲上云霄

关联服务名称

enableStatus String DISABLE

是否启用:

  • disable-禁用
  • enable-启用
relatedServiceId Long 1000

关联服务ID

routeType String INCIDENT

路由类型:

  • INCIDENT-触发事件
  • ALERT-仅触发报警
incidentLevel String P1

事件级别 1-P1 2-P2 3-P3 4-P4

assignObjectId Long 1000

事件分派对象ID(服务组ID 或用户ID)

assignObjectType String SERVICEGROUP

事件分派对象类型 SERVICEGROUP 服务组 USER 单个用户

effection String LOW

影响程度 LOW一般 HIGH-严重

matchCount Long 3

命中次数

childRuleRelation String AND、OR

子规则关系,0与,1或

eventRouteChildRules Array of 子规则

子规则

childRouteRuleId Long 1000

子规则ID

isValidChildRule Boolean false

是否有效得规则true有效false无效

parentRuleId Long 1800

规则ID

monitorSourceId Long 1

监控源ID

monitorIntegrationConfigId Long 1

集成配置ID

monitorSourceName String zabbix

监控源名称

childConditionRelation Long 1

子条件计算关系,0-与,1-或

conditions Array of 匹配条件

匹配条件

key String alarmName

条件可以

value String Zabbix server

匹配值

operationSymbol String contain

操作符

problemLevel String 1

故障等级

createTime String 2020-09-08 15:30:30

创建时间

updateTime String 2020-09-08 15:30:30

修改时间

notifyChannels Array of String [SMS,PHONE]

通知渠道

notifyChannelNames Array of String [短信,电话]

通知渠道名称

assignObjectName String 刘德华

通知对象名称

relServiceDeleteType Integer 1

服务删除字段

problemLevelGroup Map

故障等级组

Object

服务组

childRuleRelation Integer 11

子规则

matchCount Long 11

数量

timeWindow Long 1

时间窗口

timeWindowUnit String 1

时间单元

enableUpgrade Boolean true

是否开启

upgradeTimeWindow Long 1

时间窗口

upgradeTimeWindowUnit String 1

服务单元

coverageProblemLevels Array of String 1

故障等级

problemEffectionServices Array of Long 1

故障关联服务

convergenceFields Array of String name

收敛字段名

convergenceType Integer 0

收敛类型(0:流转规则收敛,1:字段收敛)

{

"requestId": "6B9347ED-FD93-42B4-B9A4-7282962F5D6A",

"data": {

"routeRuleId": 180000000,

"subscriptionName": "我的订阅",

"ruleName": "规则1",

"timeWindow": 3,

"relatedServiceName": "冲上云霄",

"enableStatus": "DISABLE",

"relatedServiceId": 1000,

"routeType": "INCIDENT",

"incidentLevel": "P1",

"assignObjectId": 1000,

"assignObjectType": "SERVICEGROUP",

"effection": "LOW",

"matchCount": 3,

"eventRouteChildRules": { "childRouteRuleId": 1000, "isValidChildRule": false, "parentRuleId": 1800, "monitorSourceId": 1, "monitorIntegrationConfigId": 1, "monitorSourceName": "zabbix", "conditions": [ { "key": "alarmName", "value": "Zabbix server", "operationSymbol": "contain" }

}

],

"createTime": "2020-09-08 15:30:30",

"updateTime": "2020-09-08 15:30:30",

"notifyChannels": "[SMS,PHONE"

],

"notifyChannelNames": "[短信,电话"

],

"assignObjectName": "刘德华"

}

}

示例

请求示例

POST /routeRule/detail HTTP/1.1
Host:gemp.aliyuncs.com
Content-Type:application/json

{
  "routeRuleId" : 1,
  "clientToken" : "C4BE3837-1A13-413B-A225-2C88188E8A43"
}

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<GetRouteRuleResponse>
    <requestId>6B9347ED-FD93-42B4-B9A4-7282962F5D6A</requestId>
    <data>
        <routeRuleId>180000000</routeRuleId>
        <subscriptionName>我的订阅</subscriptionName>
        <ruleName>规则1</ruleName>
        <timeWindow>3</timeWindow>
        <relatedServiceName>冲上云霄</relatedServiceName>
        <enableStatus>DISABLE</enableStatus>
        <relatedServiceId>1000</relatedServiceId>
        <routeType>INCIDENT</routeType>
        <incidentLevel>P1</incidentLevel>
        <assignObjectId>1000</assignObjectId>
        <assignObjectType>SERVICEGROUP</assignObjectType>
        <effection>LOW</effection>
        <matchCount>3</matchCount>
        <eventRouteChildRules>
            <childRouteRuleId>1000</childRouteRuleId>
            <isValidChildRule>false</isValidChildRule>
            <parentRuleId>1800</parentRuleId>
            <monitorSourceId>1</monitorSourceId>
            <monitorIntegrationConfigId>1</monitorIntegrationConfigId>
            <monitorSourceName>zabbix</monitorSourceName>
            <conditions>
                <key>alarmName</key>
                <value>Zabbix server</value>
                <operationSymbol>contain</operationSymbol>
            </conditions>
        </eventRouteChildRules>
        <createTime>2020-09-08 15:30:30</createTime>
        <updateTime>2020-09-08 15:30:30</updateTime>
        <notifyChannels>[SMS,PHONE]</notifyChannels>
        <notifyChannelNames>[短信,电话]</notifyChannelNames>
        <assignObjectName>刘德华</assignObjectName>
    </data>
</GetRouteRuleResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "requestId" : "6B9347ED-FD93-42B4-B9A4-7282962F5D6A",
  "data" : {
    "routeRuleId" : 180000000,
    "subscriptionName" : "我的订阅",
    "ruleName" : "规则1",
    "timeWindow" : 3,
    "relatedServiceName" : "冲上云霄",
    "enableStatus" : "DISABLE",
    "relatedServiceId" : 1000,
    "routeType" : "INCIDENT",
    "incidentLevel" : "P1",
    "assignObjectId" : 1000,
    "assignObjectType" : "SERVICEGROUP",
    "effection" : "LOW",
    "matchCount" : 3,
    "eventRouteChildRules" : [ {
      "childRouteRuleId" : 1000,
      "isValidChildRule" : false,
      "parentRuleId" : 1800,
      "monitorSourceId" : 1,
      "monitorIntegrationConfigId" : 1,
      "monitorSourceName" : "zabbix",
      "conditions" : [ {
        "key" : "alarmName",
        "value" : "Zabbix server",
        "operationSymbol" : "contain"
      } ]
    } ],
    "createTime" : "2020-09-08 15:30:30",
    "updateTime" : "2020-09-08 15:30:30",
    "notifyChannels" : [ "[SMS,PHONE]" ],
    "notifyChannelNames" : [ "[短信,电话]" ],
    "assignObjectName" : "刘德华"
  }
}

错误码

HttpCode 错误码 错误信息 描述
404 RouteRuleNotExisted The rule does not exist. 流转规则不存在

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。