Modifies a custom alert rule.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateRemind

The operation that you want to perform.

RegionId String Yes cn-shanghai

The ID of the region in which you want to modify a custom alert rule. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

RemindId Long Yes 1234

The ID of the custom alert rule.

RemindName String No update_remindname

The name of the custom alert rule. The name can be a maximum of 128 characters in length.

DndEnd String No 08:00

The end of the period during which no alert notifications are sent. Specify a value in the hh:mm format. Valid values of hh: 0 to 23. Valid values of mm: 0 to 59.

RemindUnit String No NODE

The type of the object to be monitored. Valid values:

  • NODE: node.
  • BASELINE: baseline.
  • PROJECT: workspace.
  • BIZPROCESS: workflow.
NodeIds String No 1,2,3

The ID of the node to be monitored. An alert rule can monitor a maximum of 50 nodes. Separate multiple IDs with commas (,).

This parameter is available if you set the RemindUnit parameter to NODE.

BaselineIds String No 1,2,3

The ID of the baseline to be monitored. An alert rule can monitor a maximum of five baselines. Separate multiple IDs with commas (,).

This parameter is available if you set the RemindUnit parameter to BASELINE.

ProjectId Long No 1234

The ID of the workspace to be monitored. An alert rule can monitor only one workspace.

This parameter is available if you set the RemindUnit parameter to PROJECT.

BizProcessIds String No 1,2,3

The ID of the workflow to be monitored. An alert rule can monitor a maximum of five workflows. Separate multiple IDs with commas (,).

This parameter is available if you set the RemindUnit parameter to BIZPROCESS.

RemindType String No FINISHED

The condition that triggers the alert rule. Valid values:

  • FINISHED: The system monitors an instance when it starts to run and sends an alert notification after the running of the instance is complete.
  • UNFINISHED: The system monitors an instance when it starts to run and sends an alert notification if the instance is still running at the specified point in time.
  • ERROR: The system monitors an instance when it starts to run and sends an alert notification if an error occurs.
  • CYCLE_UNFINISHED: The system sends an alert notification if a monitored instance is still running at the end of the specified cycle. In most cases, you can configure this trigger condition for instances that are scheduled by hour.
  • TIMEOUT: The system monitors an instance when it starts to run and sends an alert notification if the instance is still running after the specified period ends. In most cases, you can configure this trigger condition to monitor the duration of instances.

For more information, see Manage custom alert rules.

MaxAlertTimes Integer No 3

The maximum number of alert notifications that can be sent. Valid values: 1 to 10. Default value: 3.

AlertInterval Integer No 1800

The intervals at which alert notifications are sent. Unit: seconds. Minimum value: 1200. Default value: 1800.

Detail String No null

The value format required by this parameter varies based on the value that you specify for the RemindType parameter. Take note of the following items:

  • If the RemindType parameter is set to FINISHED, leave this parameter empty.
  • If the RemindType parameter is set to UNFINISHED, set this parameter to key-value pairs. Example: {"hour":23,"minu":59}. Valid values of hour: 0 to 47. Valid values of minu: 0 to 59.
  • If the RemindType parameter is set to ERROR, leave this parameter empty.
  • If the RemindType parameter is set to CYCLE_UNFINISHED, set this parameter to key-value pairs in the JSON format. Example: {"1":"05:50","2":"06:50","3":"07:50","4":"08:50","5":"09:50","6":"10:50","7":"11:50","8":"12:50","9":"13:50","10":"14:50","11":"15:50","12":"16:50","13":"17:50","14":"18:50","15":"19:50","16":"20:50","17":"21:50","18":"22:50","19":"23:50","20":"24:50","21":"25:50"}.

    A key in the JSON string indicates the sequence number of a cycle. Valid values of keys: 1 to 288. A value in the JSON string indicates the time in point when a monitored instance times out in the relevant cycle. Values must be in the format of hh:mm. Valid values of hh: 0 to 47. Valid values of mm: 0 to 59.

  • If the RemindType parameter is set to TIMEOUT, set this parameter to the timeout period. Unit: seconds. Example: 1800. This indicates that an alert notification is sent if the duration of a monitored instance exceeds 30 minutes.
AlertUnit String No OWNER

The recipient to whom alert notifications are sent. Valid values: OWNER and OTHER. A value of OWNER indicates that alert notifications are sent to the object owner. A value of OTHER indicates that alert notifications are sent to a specified user.

AlertMethods String No SMS, MAIL

The notification method. Valid values:

  • MAIL: Alert notifications are sent by emails.
  • SMS: Alert notifications are sent by text messages.
  • PHONE: Alert notifications are sent by phone calls. You can use this notification method only in DataWorks Professional Edition or more advanced editions.
  • DINGROBOTS: Alert notifications are sent by DingTalk messages. You can use this notification method only if the RobotUrls parameter is set.

You can specify multiple notification methods. Separate them with commas (,).

AlertTargets String No 9527952795279527

The value format required by this parameter varies based on the value that you specify for the AlertUnit parameter. Take note of the following items:

  • If the AlertUnit parameter is set to OWNER, leave this parameter empty.
  • If the AlertUnit parameter is set to OTHER, set this parameter to the unique ID (UID) of the specified user. You can specify multiple IDs. Separate them with commas (,). You can specify a maximum of 10 IDs.
UseFlag Boolean No true

Specifies whether to enable the alert rule. Valid values:

  • true: enables the alert rule.
  • false: disables the alert rule.
RobotUrls String No https://oapi.dingtalk.com/robot/send?access_token=******************************

The webhook URL of the DingTalk chatbot. You can specify multiple webhook URLs. Separate them with commas (,).

If this parameter is set to undefined, the specified webhook URLs are cleared.

Response parameters

Parameter Type Example Description
Data Boolean true

Indicates whether the modification to the custom alert rule succeeds.

ErrorCode String 1031203110005

The error code that is returned.

ErrorMessage String The specified parameters are invalid.

The error message that is returned.

HttpStatusCode Integer 200

The HTTP status code that is returned.

RequestId String 0000-ABCD-EFG****

The unique ID of the request. You can use the ID to troubleshoot issues.

Success Boolean true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateRemind
&RegionId=cn-shanghai
&RemindId=1234
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>true</Data>
<ErrorCode>1031203110005</ErrorCode>
<ErrorMessage>The specified parameters are invalid.</ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG****",
    "HttpStatusCode": 200,
    "Data": true,
    "ErrorCode": 1031203110005,
    "ErrorMessage": "The specified parameters are invalid.",
    "Success": true
}

Error codes

Http status code Error code Error message Description
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has reached the upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The error message returned because the number of requests per day for the resource has reached the upper limit.
429 Throttling.Resource You have reached the limit for the resource. Please contact us by submitting a ticket. The error message returned because your quota for the resource has reached the upper limit. Submit a ticket for help.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted within a short period of time. Try again later.
500 Forbidden.Not.Server The dataworksAPI service is not available in this area. Please try it in another area. The error message returned because the DataWorks API is unavailable in this region. Try another region.
500 Forbidden.Wkbench.BaselineNoPermission You are not authorized to access the baseline. The error message returned because you are not authorized to access the specified baseline.
500 Forbidden.Wkbench.ProjectNoPermission You are not authorized to access the workspace. The error message returned because you are not authorized to access the specified workspace.
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal error occurred. Try again later.
500 Forbidden.Wkbench.RemindNoPermission You are not authorized to modify the reminder. The error message returned because you are not authorized to modify the custom alert rule.
500 Invalid.Wkbench.RemindNotExist The reminder does not exist. The error message returned because the specified custom alert rule does not exist.

For a list of error codes, visit the API Error Center.