根据策略id,获取用户的一条告警
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
sysom:GetAlertStrategy |
none |
*全部资源
|
无 | 无 |
请求语法
GET /api/v1/alertPusher/alert/getStrategy HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| id |
integer |
否 |
策略 ID |
1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| code |
string |
状态码
|
Success |
| data |
object |
返回数据。 |
|
| createdAt |
integer |
创建时间。 |
1751520976660 |
| enabled |
boolean |
告警策略是否生效 |
false |
| id |
integer |
告警策略 id |
1 |
| k8sLabel |
boolean |
k8s 标签 |
|
| name |
string |
策略名称 |
strategy1 |
| strategy |
object |
告警策略详情 |
|
| clusters |
array |
接收告警的集群合集 |
|
|
string |
集群名称 |
cluster1 |
|
| destinations |
any |
告警联系人 |
1 |
| items |
any |
接收告警的异常项列表 |
节点CPU使用率检测 |
| uid |
string |
用户 ID |
1222933234714935 |
| updatedAt |
integer |
更新时间。 |
1751254826285 |
| message |
string |
错误信息
|
success |
| requestId |
string |
Id of the request |
2D693121-C925-5154-8DF6-C09A8B369822 |
示例
正常返回示例
JSON格式
{
"code": "Success",
"data": {
"createdAt": 1751520976660,
"enabled": false,
"id": 1,
"k8sLabel": true,
"name": "strategy1",
"strategy": {
"clusters": [
"cluster1"
],
"destinations": "1",
"items": "节点CPU使用率检测"
},
"uid": "1222933234714935",
"updatedAt": 1751254826285
},
"message": "success",
"requestId": "2D693121-C925-5154-8DF6-C09A8B369822\n"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?