告警与响应相关接口/告警规则
PUTAlerting起始版本 1.0同步需要认证
更新告警规则
列表规则已删除使用规则管理服务列表规则已过滤更新已存在告警规则部分全量字段变更。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
ruleUuidString必填规则UUID。
请求体字段
nameString必填资源名称。
示例: Updated CPU Alert
descriptionString必填资源的详细描述。
示例: Updated alert description
operatorString必填比较运算符。
示例: >
thresholdLong必填阈值。
示例: 85
durationInteger必填持续时间。
示例: 300
响应状态
请求地址
PUT/api/v1/alerting/rules/{ruleUuid}
/api/v1/alerting/rules/{ruleUuid}
请求示例
curl -X PUT '{host}/api/v1/alerting/rules/{ruleUuid}' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Updated CPU Alert","description":"Updated alert description","operator":">","threshold":85.0,"duration":300,"severity":"warning","state":"disabled","notifyUrl":"https://example.com/callback","actions":"(nested array)","updateActions":true,"labelSelectors":"(nested object)","updateLabelSelectors":true}'
响应示例
200{
"uuid": "rule-abc123-def456",
"name": "High CPU Usage",
"description": "Triggers when CPU usage exceeds 90% for 5 minutes",
"resourceType": "vm",
"metricName": "cpu_usage_percent",
"operator": ">",
"threshold": 90.0,
"duration": 300
}变更历史
此 API 暂无变更历史记录。
