All Products
Search
Document Center

DataWorks:GetRemind

Last Updated:Nov 21, 2024

Queries the information about a custom alert rule.

Operation description

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RemindIdlongYes

The custom alert rule ID.

1234

Response parameters

ParameterTypeDescriptionExample
object
HttpStatusCodeinteger

The HTTP status code.

200
RequestIdstring

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

0000-ABCD-EFGH-IJKLMNOPQ
ErrorMessagestring

The error message.

The specified parameters are invalid.
ErrorCodestring

The error code.

1031203110005
Successboolean

Indicates whether the request was successful.

true
Dataobject

The details of the custom alert rule.

MaxAlertTimesinteger

The maximum number of alerts.

3
RemindUnitstring

The type of the object to which the custom alert rule is applied. Valid values: NODE, BASELINE, PROJECT, and BIZPROCESS. The value NODE indicates a node. The value BASELINE indicates a baseline. The value PROJECT indicates a workspace. The value BIZPROCESS indicates a workflow.

NODE
AlertIntervalinteger

The minimum interval at which alerts are reported. Unit: seconds.

1800
Useflagboolean

Indicates whether the custom alert rule is enabled. Valid values: true and false.

true
Founderstring

The ID of the Alibaba Cloud account used by the creator of the custom alert rule.

9527951795****
RemindIdlong

The custom alert rule ID.

1234
DndEndstring

The end time of the quiet hours. The value is in the hh:mm format. Valid values of hh: [0,23]. Valid values of mm: [0,59].

08:00
RemindTypestring

The conditions that trigger an alert. Valid values: FINISHED, UNFINISHED, ERROR, CYCLE_UNFINISHED, and TIMEOUT.

FINISHED
AlertUnitstring

The recipient of the alert. Valid values: OWNER and OTHER. The value OWNER indicates the node owner. The value OTHER indicates a specified user.

OWNER
DndStartstring

The start time of the quiet hours. The value is in the hh:mm format. Valid values of hh: [0,23]. Valid values of mm: [0,59].

00:00
RemindNamestring

The name of the rule.

Detailstring
  • If the value of the RemindType parameter is FINISHED, this parameter is left empty.
  • If the value of the RemindType parameter is UNFINISHED, the trigger conditions are returned as key-value pairs. Example: {"hour":23,"minu":59}. Valid values of hour: [0,47]. Valid values of minu: [0,59].
  • If the value of the RemindType parameter is ERROR, this parameter is left empty.
  • If the value of the RemindType parameter is CYCLE_UNFINISHED, the trigger conditions are returned as key-value pairs. 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"}. The key indicates the ID of the cycle. Valid values: [1,288]. The value indicates the timeout period of the node that is running in the cycle. Specify the value in the hh:mm format. Valid values of hh: [0,47]. Valid values of mm: [0,59].
  • If the value of the RemindType parameter is TIMEOUT, the timeout period is returned. Unit: seconds. Example: 1800. This value indicates that an alert is reported if the node has run for more than 30 minutes.
{"hour":23,"minu":59}
Robotsarray<object>

The webhook URLs of the DingTalk chatbots.

Robotsobject
WebUrlstring

The webhook URL of the DingTalk chatbot.

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

Indicates whether all group members are notified when the alert notification is sent to a DingTalk group. Valid values: true and false.

true
Nodesarray<object>

The nodes to which the custom alert rule is applied. This parameter is returned if the value of the RemindUnit parameter is NODE.

Nodesobject
Ownerstring

The ID of the Alibaba Cloud account used by the node owner.

9527951795****
NodeNamestring

The name of the node.

NodeIdlong

The node ID.

1234
ProjectIdlong

The ID of the workspace to which the node belongs.

1234
Baselinesarray<object>

The baselines to which the custom alert rule is applied. This parameter is returned if the value of the RemindUnit parameter is BASELINE.

Baselinesobject
BaselineNamestring

The name of the baseline.

BaselineIdlong

The baseline ID.

1234
Projectsarray<object>

The workspaces to which the custom alert rule is applied. This parameter is returned if the value of the RemindUnit parameter is PROJECT.

Projectsobject
ProjectIdlong

The workspace ID.

1234
BizProcessesarray<object>

The workflows to which the custom alert rule is applied. This parameter is returned if the value of the RemindUnit parameter is BIZPROCESS.

BizProcessesobject
BizProcessNamestring

The name of the workflow.

BizIdlong

The ID of the workflow.

9527
AlertTargetsarray

The description of the alert recipient.

AlertTargetsstring
  • If the value of the AlertUnit parameter is OWNER, this parameter is left empty.
  • If the value of the AlertUnit parameter is OTHER, the ID of the Alibaba Cloud account used by the specified user is returned. Multiple IDs are separated by commas (,).
9527952795279527
AlertMethodsarray

The alert notification method.

AlertMethodsstring

The alert notification method. Valid values:

  • MAIL
  • SMS
  • Alert notifications can be sent by text message only in the Singapore, Malaysia (Kuala Lumpur), and Germany (Frankfurt) regions. You can specify multiple notification methods. Separate them with commas (,).
SMS,MAIL
Webhooksarray

The information about the webhook URL.

Webhooksstring

The webhook URL of the WeCom or Lark chatbot. You can specify multiple webhook URLs. Separate multiple webhook URLs with commas (,). You must specify Webhooks for AlertMethods. Only DataWorks Enterprise Edition supports this parameter. The webhook URL-based alerting feature is supported in the following 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/*******

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "RequestId": "0000-ABCD-EFGH-IJKLMNOPQ",
  "ErrorMessage": "The specified parameters are invalid.",
  "ErrorCode": "1031203110005",
  "Success": true,
  "Data": {
    "MaxAlertTimes": 3,
    "RemindUnit": "NODE",
    "AlertInterval": 1800,
    "Useflag": true,
    "Founder": "9527951795****",
    "RemindId": 1234,
    "DndEnd": "08:00",
    "RemindType": "FINISHED",
    "AlertUnit": "OWNER",
    "DndStart": "00:00",
    "RemindName": "",
    "Detail": "{\"hour\":23,\"minu\":59}",
    "Robots": [
      {
        "WebUrl": "https://oapi.dingtalk.com/robot/send?access_token=******************************",
        "AtAll": true
      }
    ],
    "Nodes": [
      {
        "Owner": "9527951795****",
        "NodeName": "",
        "NodeId": 1234,
        "ProjectId": 1234
      }
    ],
    "Baselines": [
      {
        "BaselineName": "",
        "BaselineId": 1234
      }
    ],
    "Projects": [
      {
        "ProjectId": 1234
      }
    ],
    "BizProcesses": [
      {
        "BizProcessName": "",
        "BizId": 9527
      }
    ],
    "AlertTargets": [
      "9527952795279527"
    ],
    "AlertMethods": [
      "SMS,MAIL"
    ],
    "Webhooks": [
      "https://open.feishu.cn/open-apis/bot/v2/hook/*******"
    ],
    "Receivers": [
      {
        "AlertUnit": "OWNER",
        "AlertTargets": [
          "9527952795279527"
        ]
      }
    ],
    "AllowNodes": [
      123
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.AccessAccess is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.No permission, please authorize
429Throttling.ApiThe request for this resource has exceeded your available limit.-
429Throttling.Api.RiskThe request for this resource has exceeded your daily available limit.-
429Throttling.ResourceYou have reached the limit for the resource. Please contact us by submitting a ticket.-
429Throttling.SystemThe DataWorks system is busy. Try again later.-
429Throttling.UserYour request is too frequent. Try again later.-
500Forbidden.Not.ServerThe dataworksAPI service is not available in this area. Please try it in another area.-
500InternalError.SystemAn internal system error occurred. Try again later.-
500InternalError.UserId.MissingAn internal system error occurred. Try again later.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-18The Error code has changed. The response structure of the API has changedView Change Details