調用CreateRemind建立自訂警示規則。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RemindName |
string |
是 |
自訂規則的名稱,不能超過 128 個字元。 |
test_error_remind |
| DndEnd |
string |
否 |
免打擾截止時間,格式為 hh:mm。hh 的取值範圍為[0,23],mm 的取值範圍為[0,59]。 |
08:00 |
| RemindUnit |
string |
是 |
對象的類型,包括 NODE(任務節點)、BASELINE(基準) 、PROJECT(工作空間)和 BIZPROCESS(商務程序)。 |
NODE |
| NodeIds |
string |
否 |
RemindUnit(物件類型)為 NODE(任務節點)時,監控的任務節點 ID。多個 ID 之間使用英文逗號(,)分隔,一個規則最多監控 50 個節點。 |
1,2,3 |
| BaselineIds |
string |
否 |
當 RemindUnit(物件類型)為 BASELINE(基準)時,監控的基準 ID。多個 ID 之間使用英文逗號(,)分隔,一個規則最多監控 5 條基準。 |
1,2,3 |
| ProjectId |
integer |
否 |
當 RemindUnit(物件類型)為 PROJECT(工作空間)時,監控的工作空間 ID。一個規則只能監控一個工作空間。 |
9527 |
| BizProcessIds |
string |
否 |
當 RemindUnit(物件類型)為 BIZPROCESS(商務程序)時,監控的商務程序 ID。多個商務程序 ID 之間使用英文逗號(,)分隔,一個規則最多監控 5 個商務程序。 |
1,2,3 |
| RemindType |
string |
是 |
觸發條件,包括 FINISHED(完成)、UNFINISHED(未完成)、ERROR(出錯)、 CYCLE_UNFINISHED(周期未完成)和 TIMEOUT(運行逾時)。 |
FINISHED |
| MaxAlertTimes |
integer |
否 |
最大警示次數。最小值為 1,最大值為 10,預設值為 3。 |
2 |
| AlertInterval |
integer |
否 |
最小警示間隔,單位為秒。最小值為 1200,預設值為 1800。 |
1800 |
| Detail |
string |
否 |
不同觸發條件的說明如下:
|
{"hour":"23","minu":"59"} |
| AlertUnit |
string |
是 |
警示接收對象的粒度,包括 OWNER(任務責任人)和 OTHER(指定的人)。 |
OWNER |
| AlertMethods |
string |
是 |
警示方式,取值如下:
多個警示方式之間使用英文逗號(,)分隔。 |
SMS,MAIL |
| AlertTargets |
string |
否 |
|
9527952795279527 |
| RobotUrls |
string |
否 |
DingTalk群機器人的 webhook 地址,多個 webhook 地址之間使用英文逗號(,)分隔。 |
https://oapi.dingtalk.com/robot/send?access_token=****************************** |
| Webhooks |
string |
否 |
企業微信或飛書機器人的 webhook 地址,多個 webhook 地址之間使用英文逗號(,)分隔。alertMethods 中需要包含 WEBHOOKS 警示方式。 僅 DataWorks 企業版支援。 可用地區:華東 2(上海)、西南 1(成都)、華北 3(張家口)、華北 2(北京)、華東 1(杭州)、華南 1(深圳)、中國(香港)、歐洲中部 1(法蘭克福)、亞太地區東南 1(新加坡)。 |
https://open.feishu.cn/open-apis/bot/v2/hook/******* |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
請求返回結果 |
||
| HttpStatusCode |
integer |
HTTP 返回碼。 |
200 |
| Data |
integer |
建立自訂監控規則成功後,返回的自訂規則 ID。 |
1234 |
| ErrorMessage |
string |
錯誤資訊。 |
The specified parameters are invalid. |
| RequestId |
string |
本次調用的唯一 ID。出現錯誤後,您可以根據該 ID 排查問題。 |
0000-ABCD-EFG**** |
| Success |
boolean |
調用是否成功。 |
true |
| ErrorCode |
string |
錯誤碼。 |
1031203110005 |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"Data": 1234,
"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.NoProject | You have not joined any project. | |
| 500 | Invalid.Wkbench.NodeNotExist | The node does not exist. | |
| 500 | Invalid.Wkbench.BaselineNotExist | The baseline does not exist. | |
| 500 | Forbidden.Wkbench.RemindOverlimit | The maximum number of reminders is exceeded. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | 沒有許可權,請授權 |
| 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。