CreateRemind

Updated at:

Creates a custom alert rule.

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

RemindName

string

Yes

The name of the custom rule. The name cannot exceed 128 characters in length.

test_error_remind

DndEnd

string

No

The end time of the do-not-disturb period, in the hh:mm format. The valid values for hh are 0 to 23, and the valid values for mm are 0 to 59.

08:00

RemindUnit

string

Yes

The type of the monitored object. Valid values: NODE (node), BASELINE (baseline), PROJECT (workspace), and BIZPROCESS (business process).

Valid values:

  • BASELINE :

    baseline.

  • PROJECT :

    workspace.

  • NODE :

    node.

  • BIZPROCESS :

    business process.

NODE

NodeIds

string

No

The IDs of the nodes for monitoring. This parameter is required when RemindUnit (object type) is set to NODE. Separate multiple IDs with commas (,). A single rule can monitor up to 50 nodes.

1,2,3

BaselineIds

string

No

The IDs of the baselines for monitoring. This parameter is required when RemindUnit (object type) is set to BASELINE. Separate multiple IDs with commas (,). A single rule can monitor up to 5 baselines.

1,2,3

ProjectId

integer

No

The ID of the workspace for monitoring. This parameter is required when RemindUnit (object type) is set to PROJECT. A single rule can monitor only one workspace.

9527

BizProcessIds

string

No

The IDs of the business flows for monitoring. This parameter is required when RemindUnit (object type) is set to BIZPROCESS. Separate multiple IDs with commas (,). A single rule can monitor up to 5 business flows.

1,2,3

RemindType

string

Yes

The trigger condition. Valid values: FINISHED (completed), UNFINISHED (not completed), ERROR (error), CYCLE_UNFINISHED (cycle not completed), and TIMEOUT (runtime timeout).

Valid values:

  • UNFINISHED :

    Not completed.

  • EXHAUSTED_ERROR :

    error after automatic reruns.

  • CYCLE_UNFINISHED :

    Cycle not completed.

  • ERROR :

    error.

  • TIMEOUT :

    timeout.

  • FINISHED :

    completed.

FINISHED

MaxAlertTimes

integer

No

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

2

AlertInterval

integer

No

The minimum alert interval, in seconds. Minimum value: 1200. Default value: 1800.

1800

Detail

string

No

The descriptions for different trigger conditions are as follows:

  • When RemindType (trigger condition) is set to FINISHED, leave this parameter empty.

  • When RemindType (trigger condition) is set to UNFINISHED, pass the parameter in the {"hour":23,"minu":59} format. The valid values for hour are 0 to 47, and the valid values for minu are 0 to 59.

  • When RemindType (trigger condition) is set to ERROR, leave this parameter empty.

  • When RemindType (trigger condition) is set to CYCLE_UNFINISHED, pass the parameter in the {"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"} format. The key in the JSON string is the cycle number, and the valid values are 1 to 288. The value is the completion deadline for the cycle, in the hh:mm format. The valid values for hh are 0 to 47, and the valid values for mm are 0 to 59.

  • When RemindType (trigger condition) is set to TIMEOUT, pass the parameter in seconds, such as 1800. This means that an alert is triggered if the runtime exceeds 30 minutes from the start time.

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

AlertUnit

string

Yes

The type of alert recipient. Valid values: OWNER (node owner) and OTHER (specified user).

Valid values:

  • OTHER :

    specified user.

  • OWNER :

    node owner.

OWNER

AlertMethods

string

Yes

The alert method. Valid values:

  • MAIL: email.

  • SMS: text message.

  • PHONE: phone call. This method is supported only in DataWorks Professional Edition and more advanced editions.

  • Webhooks: WeCom or Lark chatbot. This method takes effect only after the Webhooks parameter is configured.

  • DINGROBOTS: DingTalk chatbot.

Separate multiple alert methods with commas (,).

SMS,MAIL

AlertTargets

string

No

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

  • When AlertUnit is set to OTHER, specify the Alibaba Cloud UIDs of the users. Separate multiple UIDs with commas (,). You can specify up to 10 UIDs.

9527952795279527

RobotUrls

string

No

The webhook URLs of the DingTalk chatbot. Separate multiple URLs with commas (,).

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

Webhooks

string

No

The webhook URLs of the WeCom or Lark chatbot. Separate multiple URLs with commas (,). The AlertMethods parameter must include WEBHOOKS.

This parameter is supported only in DataWorks Enterprise Edition. 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

The response structure.

HttpStatusCode

integer

The HTTP status code.

200

Data

integer

The ID of the custom alert rule returned after the rule is created.

1234

ErrorMessage

string

The error message.

The specified parameters are invalid.

RequestId

string

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

0000-ABCD-EFG****

Success

boolean

Indicates whether the request was successful.

true

ErrorCode

string

The error code.

1031203110005

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "Data": 1234,
  "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.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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.