使用者更新推送告警策略的狀態。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
sysom:UpdateAlertEnabled |
none |
*全部資源。
|
無 | 無 |
請求文法
POST /api/v1/alertPusher/alert/updateEnabled HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| body |
object |
否 |
請求主體參數。 |
|
| enabled |
boolean |
否 |
告警策略是否生效。 |
true |
| id |
integer |
否 |
告警策略 ID。 |
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| code |
string |
狀態碼。
|
Success |
| data |
any |
返回資料。 |
{ "uid": "1808078950770264", "name": "test-name", "strategy": { "items": [ "節點CPU使用率檢測" ], "clusters": [ "cluster1" ] }, "enabled": true, "id": 1, "created_at": 1753172727, "updated_at": 1753172727 } |
| message |
string |
錯誤資訊。
|
success |
| requestId |
string |
Id of the request |
2D693121-C925-5154-8DF6-C09A8B369822 |
樣本
正常返回樣本
JSON格式
{
"code": "Success",
"data": "{\n \"uid\": \"1808078950770264\",\n \"name\": \"test-name\",\n \"strategy\": {\n \"items\": [\n \"节点CPU使用率检测\"\n ],\n \"clusters\": [\n \"cluster1\"\n ]\n },\n \"enabled\": true,\n \"id\": 1,\n \"created_at\": 1753172727,\n \"updated_at\": 1753172727\n }",
"message": "success",
"requestId": "2D693121-C925-5154-8DF6-C09A8B369822\n"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。