UpdateRemind

更新时间:
复制 MD 格式

Modifies the settings of a custom alert rule, such as the trigger condition, notification method, and recipients.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RemindId

integer

Yes

The custom alert rule ID.

1234

RemindName

string

No

The name of the custom alert rule. Maximum length: 128 characters.

update_remindname

DndEnd

string

No

The end time of the do-not-disturb period during which no alert notifications are sent. Format: hh:mm. Valid values of hh: [0,23]. Valid values of mm: [0,59].

08:00

RemindUnit

string

No

The type of object to which the custom alert rule applies. Valid values:

  • NODE

  • BASELINE

  • PROJECT

  • BIZPROCESS

NODE

NodeIds

string

No

The node ID to which the custom alert rule applies. You can specify up to 50 node IDs, separated by commas (,). This parameter takes effect when you set the RemindUnit parameter to NODE.

1,2,3

BaselineIds

string

No

The baseline ID to which the custom alert rule applies. You can specify up to 5 baseline IDs, separated by commas (,). This parameter takes effect when you set the RemindUnit parameter to BASELINE.

1,2,3

ProjectId

integer

No

The workspace ID to which the custom alert rule applies. You can specify only one workspace. This parameter takes effect when you set the RemindUnit parameter to PROJECT.

1234

BizProcessIds

string

No

The workflow ID to which the custom alert rule applies. You can specify up to 5 workflow IDs, separated by commas (,). This parameter takes effect when you set the RemindUnit parameter to BIZPROCESS.

1,2,3

RemindType

string

No

The trigger condition for the alert rule. Valid values:

  • FINISHED: An alert notification is sent after the instance finishes running.

  • UNFINISHED: An alert notification is sent if the instance is still running at the specified point in time.

  • ERROR: An alert notification is sent if an error occurs during instance execution.

  • CYCLE_UNFINISHED: An alert notification is sent if the instance is still running at the end of the specified cycle. Typically used for hourly scheduled node instances.

  • TIMEOUT: An alert notification is sent if the instance is still running after the specified timeout period. Typically used to monitor instance running duration.

For more information, see Manage custom alert rules.

FINISHED

MaxAlertTimes

integer

No

The maximum number of alerts. Valid values: 1 to 10. Default value: 3.

3

AlertInterval

integer

No

The interval between alert notifications. Unit: seconds. Minimum value: 1200. Default value: 1800.

1800

Detail

string

No

The trigger condition details, which vary based on the RemindType value.

  • 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,47]. Valid values of minu: [0,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,47]. Valid values of mm: [0,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 running duration of a monitored instance exceeds 30 minutes.

{"hour":23,"minu":59}

AlertUnit

string

No

The alert notification recipient type. Valid values: OWNER (the object owner) and OTHER (a specified user).

OWNER

AlertMethods

string

No

The notification method. Valid values:

  • MAIL: Alerts are sent by email.

  • SMS: Alerts are sent by text message.

  • PHONE: Alerts are sent by phone call. Available only in DataWorks Professional Edition or higher.

  • DINGROBOTS: Alerts are sent by DingTalk message. Requires the RobotUrls parameter to be configured.

  • WEBHOOKS (WeCom or Lark chatbot): Alerts are sent by WeCom or Lark message. Requires the Webhooks parameter to be configured.

Separate multiple notification methods with commas (,).

SMS,MAIL

AlertTargets

string

No

The format of this parameter depends on the AlertUnit value:

  • If the AlertUnit parameter is set to OWNER, leave this parameter empty.

  • If AlertUnit is set to OTHER, set this parameter to the UID of the target user. You can specify up to 10 UIDs, separated by commas (,).

9527952795279527

UseFlag

boolean

No

Specifies whether to enable the alert rule. Valid values:

  • true

  • false

true

RobotUrls

string

No

The webhook URL of the DingTalk chatbot. Separate multiple URLs with commas (,). Set to undefined to clear the configured webhook URLs.

https://oapi.dingtalk.com/robot/send?access_token=******************************

Webhooks

string

No

The webhook URL of the WeCom or Lark chatbot. Separate multiple URLs with commas (,). The AlertMethods value must include WEBHOOKS. Set to undefined to clear the configured webhook URLs.

Only DataWorks Enterprise Edition supports this parameter. Supported regions: China (Shanghai), China (Chengdu), China (Zhangjiakou), China (Beijing), China (Hangzhou), China (Shenzhen), China (Hong Kong), Germany (Frankfurt), and Singapore.

https://open.feishu.cn/open-apis/bot/v2/hook/*******

Response elements

Element

Type

Description

Example

object

HttpStatusCode

integer

The HTTP status code.

200

Data

boolean

Indicates whether the custom alert rule was modified successfully.

true

ErrorMessage

string

The error message.

The specified parameters are invalid.

RequestId

string

The request ID, which can be used for troubleshooting.

0000-ABCD-EFG****

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

ErrorCode

string

The error code.

1031203110005

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.