通知订阅详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
POST /notify/subscription/detail HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
Object | Body | 否 | A short description of struct |
||
subscriptionId | Long | Body | 否 | 10 | 订阅id |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
requestId | String | 10REQUES-AC5C-4B59-BE11-378F117A6A88 | requestId |
data | Object | Object |
|
subscriptionId | Long | 68 | 订阅id |
subscriptionTitle | String | newTitle | 通知订阅名称 |
scope | String | SERVICE | ALL全部 SERVICE服务 ROUTERULE 流转规则 |
notifyObjectType | String | USER | SERVICEGROUP服务组 USER个人 |
expiredType | String | LONG_TERM | 有效期类型 LONG_TERM长期 SHORT_TERM短期 |
period | String | 1个月 | 时间段字符串 |
startTime | String | 2020-05-9 10:10:10 | 时效开始时间 |
endTime | String | 2021-08-9 10:10:10 | 时效结束时间 |
status | String | ENABLE | ENABLE启用 DISABLE禁用 |
scopeObjectList | Array of scopeObjectList | Array |
|
id | Long | 10 | id主键 |
scope | String | SERVICE | 订阅范围类型ALL全部 SERVICE服务 ROUTERULE 流转规则 |
scopeObjectId | Long | 10 | 订阅范围对象关联表主键id |
scopeObject | String | 阿里云 | 订阅范围对象名称 |
notifyObjectList | Array of notifyObjectList | 通知对象列表 |
|
id | Long | 23 | id主键 |
notifyObjectType | Long | USER | 通知对象类型SERVICEGROUP服务组 USER个人 |
notifyObjectId | Long | 19 | 关联主键id |
name | String | TestName | 通知对象名 |
notifyStrategyList | Array of notifyStrategyList | 通知策略列表 |
|
instanceType | Long | INCIDENT | 订阅实例类型,INCIDENT事件、ALERT报警、PROBLEM故障 |
strategies | Array of strategies | 策略 |
|
id | Long | 12 | 策略主键 |
channels | String | SMS | 通知渠道 |
conditions | Array of conditions | 条件 |
|
effection | String | HIGH | 影响范围 |
problemNotifyType | String | PROBLEM_NOTIFY | 故障通知类型 |
level | String | P1 | 等级 |
action | String | INCIDENT_TRIGGER | 时间动作 |
periodChannel | Object | 分时间段渠道 |
|
workday | String | DINGDING | 工作时间 |
nonWorkday | String | DINGDING | 非工作时间 |
示例
请求示例
POST /notify/subscription/detail HTTP/1.1
Host:gemp.cn-shanghai.aliyuncs.com
Content-Type:application/json
{
"subscriptionId" : 10
}
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetSubscriptionResponse>
<requestId>10REQUES-AC5C-4B59-BE11-378F117A6A88</requestId>
<data>
<subscriptionId>68</subscriptionId>
<subscriptionTitle>newTitle</subscriptionTitle>
<scope>SERVICE</scope>
<notifyObjectType>USER</notifyObjectType>
<expiredType>LONG_TERM</expiredType>
<period>1个月</period>
<startTime>2020-05-9 10:10:10</startTime>
<endTime>2021-08-9 10:10:10</endTime>
<status>ENABLE</status>
<scopeObjectList>
<id>10</id>
<scope>SERVICE</scope>
<scopeObjectId>10</scopeObjectId>
<scopeObject>阿里云</scopeObject>
</scopeObjectList>
<notifyObjectList>
<id>23</id>
<notifyObjectId>19</notifyObjectId>
<name>TestName</name>
</notifyObjectList>
<notifyStrategyList>
<strategies>
<id>12</id>
<channels>SMS</channels>
<conditions>
<effection>HIGH</effection>
<problemNotifyType>PROBLEM_NOTIFY</problemNotifyType>
<level>P1</level>
<action>INCIDENT_TRIGGER</action>
</conditions>
<periodChannel>
<workday>DINGDING</workday>
<nonWorkday>DINGDING</nonWorkday>
</periodChannel>
</strategies>
</notifyStrategyList>
</data>
</GetSubscriptionResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"requestId" : "10REQUES-AC5C-4B59-BE11-378F117A6A88",
"data" : {
"subscriptionId" : 68,
"subscriptionTitle" : "newTitle",
"scope" : "SERVICE",
"notifyObjectType" : "USER",
"expiredType" : "LONG_TERM",
"period" : "1个月",
"startTime" : "2020-05-9 10:10:10",
"endTime" : "2021-08-9 10:10:10",
"status" : "ENABLE",
"scopeObjectList" : [ {
"id" : 10,
"scope" : "SERVICE",
"scopeObjectId" : 10,
"scopeObject" : "阿里云"
} ],
"notifyObjectList" : [ {
"id" : 23,
"notifyObjectId" : 19,
"name" : "TestName"
} ],
"notifyStrategyList" : [ {
"strategies" : [ {
"id" : 12,
"channels" : "SMS",
"conditions" : [ {
"effection" : "HIGH",
"problemNotifyType" : "PROBLEM_NOTIFY",
"level" : "P1",
"action" : "INCIDENT_TRIGGER"
} ],
"periodChannel" : {
"workday" : "DINGDING",
"nonWorkday" : "DINGDING"
}
} ]
} ]
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
404 | NotifySubsNotExists | The specified subscription does not exist. | 通知订阅不存在 |
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。