呼叫 UpdateRemind 更新自訂監控規則。
介面說明
前置條件:呼叫本介面前需開通 DataWorks 企業版或旗艦版;未滿足版本要求時介面會返回 403 Forbidden.Access。
調試
您可以在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 |
否 |
釘釘群組機器人的 WebHook 位址,多個 WebHook 位址之間使用英文逗號(,)分隔。 當該參數設定為 undefined 時,系統會清空釘釘機器人的 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。