調用UpdateRemind更新自訂監控規則。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RemindId |
integer |
是 |
自訂規則的 ID。 |
1234 |
| RemindName |
string |
否 |
自訂規則的名稱,不能超過 128 個字元。 |
update_remindname |
| DndEnd |
string |
否 |
免打擾的截止時間,即在設定的時間之前不會發送警示。格式為 hh:mm。hh 的取值範圍為[0,23] ,mm 的取值範圍為[0,59]。 |
08:00 |
| RemindUnit |
string |
否 |
監控對象的類型。取值如下:
|
NODE |
| NodeIds |
string |
否 |
監控對象為節點時的節點 ID。一個規則最多監控 50 個節點,多個節點 ID 之間使用英文逗號(,)分隔。 當 RemindUnit 參數取值為 NODE(節點)時,當前參數生效。 |
1,2,3 |
| BaselineIds |
string |
否 |
監控對象為基準時的基準 ID。一個規則最多監控 5 條基準,多個基準 ID 之間使用英文逗號(,)分隔。 當 RemindUnit 參數取值為 BASELINE(基準)時,當前參數生效。 |
1,2,3 |
| ProjectId |
integer |
否 |
監控對象為工作空間時的工作空間 ID。一個規則只能監控一個工作空間。 當 RemindUnit 參數取值為 PROJECT(工作空間)時,當前參數生效。 |
1234 |
| BizProcessIds |
string |
否 |
監控對象為商務程序時的商務程序 ID。一個規則最多監控 5 個商務程序,多個商務程序 ID 之間使用英文逗號(,)分隔。 當 RemindUnit 參數取值為 BIZPROCESS(商務程序)時,當前參數生效。 |
1,2,3 |
| RemindType |
string |
否 |
觸發警示規則的條件。取值如下:
更多觸發警示規則的內容,詳情請參見自訂規則。 |
FINISHED |
| MaxAlertTimes |
integer |
否 |
最大警示次數。取值範圍為[1,10],預設值為 3。 |
3 |
| AlertInterval |
integer |
否 |
警示間隔,單位為秒。最小值為 1200,預設值為 1800。 |
1800 |
| Detail |
string |
否 |
不同觸發條件的參數配置詳情,具體如下:
|
{"hour":23,"minu":59} |
| AlertUnit |
string |
否 |
警示的接收對象,包括 OWNER(任務責任人)和 OTHER(指定的使用者)。 |
OWNER |
| AlertMethods |
string |
否 |
警示的方式,取值如下:
多個警示方式之間使用英文逗號(,)分隔。 |
SMS,MAIL |
| AlertTargets |
string |
否 |
不同警示接收人的配置詳情:
|
9527952795279527 |
| UseFlag |
boolean |
否 |
是否啟用警示規則,取值如下:
|
true |
| RobotUrls |
string |
否 |
DingTalk群機器人的 WebHook 地址,多個 WebHook 地址之間使用英文逗號(,)分隔。 當該參數配置為 undefined 時,系統會清空DingTalk機器人的 WebHook 地址。 |
https://oapi.dingtalk.com/robot/send?access_token=****************************** |
| Webhooks |
string |
否 |
企業微信或飛書機器人的 webhook 地址,多個 webhook 地址之間使用英文逗號(,)分隔。alertMethods 中需要包含 WEBHOOKS 警示方式。當該參數配置為 undefined 時,系統會清空 WebHook 地址。 僅 DataWorks 企業版支援。 可用地區:華東 2(上海)、西南 1(成都)、華北 3(張家口)、華北 2(北京)、華東 1(杭州)、華南 1(深圳)、中國(香港)、歐洲中部 1(法蘭克福)、亞太地區東南 1(新加坡)。 |
https://open.feishu.cn/open-apis/bot/v2/hook/******* |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| Data |
boolean |
更新自訂監控規則的返回結果。 |
true |
| ErrorMessage |
string |
錯誤資訊。 |
The specified parameters are invalid. |
| RequestId |
string |
本次調用的唯一 ID。出現錯誤後,您可以根據該 ID 排查問題。 |
0000-ABCD-EFG**** |
| Success |
boolean |
調用是否成功。取值如下:
|
true |
| ErrorCode |
string |
錯誤碼。 |
1031203110005 |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"Data": true,
"ErrorMessage": "The specified parameters are invalid.",
"RequestId": "0000-ABCD-EFG****",
"Success": true,
"ErrorCode": "1031203110005"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 500 | Forbidden.Not.Server | The dataworksAPI service is not available in this area. Please try it in another area. | |
| 500 | Forbidden.Wkbench.BaselineNoPermission | You are not authorized to access the baseline. | |
| 500 | Forbidden.Wkbench.ProjectNoPermission | You are not authorized to access the workspace. | |
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 500 | Forbidden.Wkbench.RemindNoPermission | You are not authorized to modify the reminder. | |
| 500 | Invalid.Wkbench.RemindNotExist | The reminder does not exist. | |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.Resource | You have reached the limit for the resource. Please contact us by submitting a ticket. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。