All Products
Search
Document Center

DataWorks:ListAlertMessages

Last Updated:Oct 17, 2024

Queries a list of alerts.

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
PageNumberintegerYes

The page number. Default value: 1. Minimum value: 1. Maximum value: 30.

1
PageSizeintegerYes

The number of entries per page. Default value: 10. Maximum value: 100.

10
BeginTimestringYes

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-dd'T'HH:mm:ssZ format. The time must be in UTC.

2020-04-02T00:00:00+0800
EndTimestringYes

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-dd'T'HH:mm:ssZ format. The time must be in UTC.

2020-04-04T00:00:00+0800
RemindIdlongNo

The custom alert rule ID. This parameter takes effect if the AlertRuleTypes parameter is set to USER_DEFINE. You can configure either this parameter or the BaselineId parameter.

9527
AlertMethodsstringNo

The 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,PHONE
AlertUserstringNo

The ID of the Alibaba Cloud account used by the alert recipient.

123456
AlertRuleTypesstringNo

The type of the alert rule. Valid values: GLOBAL, USER_DEFINE, and OTHER. The value GLOBAL indicates that the alert rule is a global alert rule. The value USER_DEFINE indicates that the alert rule is customized by a user. The value OTHER indicates that the alert rule is a rule of another type. You can specify multiple types. Separate them with commas (,).

GLOBAL,USER_DEFINE,OTHER
BaselineIdlongNo

The baseline ID. This parameter takes effect if the AlertRuleTypes parameter is set to GLOBAL. You can configure either this parameter or the RemindId parameter.

1234

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

HttpStatusCodeinteger

The HTTP status code.

200
RequestIdstring

The request ID.

0000-ABCD-EFG****
ErrorMessagestring

The error message.

The specified parameters are invalid.
ErrorCodestring

The error code.

Invalid.Tenant.ConnectionNotExists
Successboolean

Indicates whether the request was successful.

true
Dataobject

The information about returned alerts.

PageNumberstring

The page number.

1
PageSizestring

The number of entries per page.

10
TotalCountstring

The total number of alerts returned.

100
AlertMessagesarray<object>

The alerts.

AlertMessagesobject
RemindIdlong

The ID of the custom alert rule that was triggered. This parameter is returned if the value of the Source parameter is REMIND_ALERT.

1234
AlertMessageStatusstring

The sending status of the notification. Valid values: READY_TO_SEND, SEND_FAIL, SEND_SUCCESS, and SEND_OVERLIMIT. The value READY_TO_SEND indicates that the notification is waiting to be sent. The value SEND_FAIL indicates that the notification fails to be sent. The value SEND_SUCCESS indicates that the notification is sent. The value SEND_OVERLIMIT indicates that the number of notifications that are sent exceeds the upper limit.

READY_TO_SEND
AlertUserstring

The ID of the Alibaba Cloud used by the alert recipient.

9527952795****
AlertTimelong

The timestamp when the alert was reported.

1553531401000
AlertMethodstring

The notification method. Valid values: MAIL, SMS, and PHONE. Only DataWorks Professional Edition and more advanced editions support the PHONE notification method.

SMS
Sourcestring

The type of the alert. Valid values: REMIND_ALERT, TOPIC_ALERT, SLA_ALERT, NODE_CYCLE_ALERT, and NODE_LONELY_ALERT. The value REMIND_ALERT indicates that the alert is a custom alert. The value TOPIC_ALERT indicates that the alert is an event alert. The value SLA_ALERT indicates that the alert is a baseline alert. The value NODE_CYCLE_ALERT indicates that the alert is reported for a node dependency loop. The value NODE_LONELY_ALERT indicates that the alert is reported for isolated nodes.

REMIND_ALERT
Contentstring

The content of the alert.

RemindNamestring

The name of the custom alert rule that was triggered. This parameter is returned if the value of the Source parameter is REMIND_ALERT.

AlertIdlong

The alert ID.

1234
Instancesarray<object>

The instances that triggered the custom alert rule. This parameter is returned if the value of the Source parameter is REMIND_ALERT. This parameter is left empty if the value of the Source parameter is not REMIND_ALERT.

Instancesobject
Statusstring

The status of the instance. Valid values: NOT_RUN, WAIT_TIME, WAIT_RESOURCE, RUNNING, CHECKING, CHECKING_CONDITION, FAILURE, and SUCCESS. The value NOT_RUN indicates that the instance is not run. The value WAIT_TIME indicates that the instance is waiting to be run. The value WAIT_RESOURCE indicates that the instance is waiting for resources. The value RUNNING indicates that the instance is running. The value CHECKING indicates that data quality is being checked for the node for which the instance is generated. The value CHECKING_CONDITION indicates that branch conditions are being checked for the node for which the instance is generated. The value FAILURE indicates that the instance fails to run. The value SUCCESS indicates that the instance is successfully run.

NOT_RUN
InstanceIdlong

The instance ID.

12345
NodeNamestring

The name of the node.

NodeIdlong

The node ID.

1234
ProjectIdlong

The ID of the workspace to which the node belongs.

1234
Topicsarray<object>

The events that triggered alerts. This parameter is returned if the value of the Source parameter is TOPIC_ALERT. This parameter is left empty if the value of the Source parameter is not TOPIC_ALERT.

Topicsobject
TopicNamestring

The name of the event.

InstanceIdlong

The ID of the instance that triggered the event.

12345
TopicIdlong

The event ID.

1234
TopicOwnerstring

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

9527952795****
NodeIdlong

The ID of the node that triggered the event.

1234
TopicStatusstring

The status of the event. Valid values: IGNORE, NEW, FIXING, and RECOVER. The value IGNORE indicates that the event is ignored. The value NEW indicates that the event is a new event. The value FIXING indicates that the event is being handled. The value RECOVER indicates that the event is handled.

FIXING
Nodesarray<object>

The nodes returned for different alert sources.

  • The nodes that form a loop are returned if the value of the Source parameter is NODE_CYCLE_ALERT.
  • The nodes that are isolated are returned if the value of the Source parameter is NODE_LONELY_ALERT.
Nodesobject
Ownerstring

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

95279527952****
NodeNamestring

The name of the node.

NodeIdlong

The node ID.

1234
ProjectIdlong

The ID of the workspace to which the node belongs.

1234
SlaAlertobject

The basic information about the baseline instance that triggered an alert. This parameter is returned if the value of the Source parameter is SLA_ALERT. This parameter is left empty if the value of the Source parameter is not SLA_ALERT.

Statusstring

The status of the baseline. Valid values: ERROR, SAFE, DANGEROUS, and OVER. The value ERROR indicates that no nodes are associated with the baseline, or all nodes associated with the baseline are suspended. The value SAFE indicates that nodes are run before the alert duration begins. The value DANGEROUS indicates that nodes are still running after the alert duration ends but the committed completion time does not arrive. The value OVER indicates that nodes are still running after the committed completion time.

SAFE
BaselineOwnerstring

The ID of the Alibaba Cloud account used by the baseline owner. Multiple IDs are separated by commas (,).

952795279****
BaselineIdlong

The baseline ID.

1234
BaselineNamestring

The name of the baseline.

Bizdatelong

The data timestamp of the baseline instance.

1553443200000
ProjectIdlong

The ID of the workspace to which the baseline belongs.

1234
InGroupIdinteger

The ID of the cycle of the baseline instance. Valid values of the ID of an hour-level cycle: [1,24]. The ID of a day-level cycle is 1.

1

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "RequestId": "0000-ABCD-EFG****",
  "ErrorMessage": "The specified parameters are invalid.",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "PageNumber": "1",
    "PageSize": "10",
    "TotalCount": "100",
    "AlertMessages": [
      {
        "RemindId": 1234,
        "AlertMessageStatus": "READY_TO_SEND",
        "AlertUser": "9527952795****",
        "AlertTime": 1553531401000,
        "AlertMethod": "SMS",
        "Source": "REMIND_ALERT",
        "Content": "",
        "RemindName": "",
        "AlertId": 1234,
        "Instances": [
          {
            "Status": "NOT_RUN",
            "InstanceId": 12345,
            "NodeName": "",
            "NodeId": 1234,
            "ProjectId": 1234
          }
        ],
        "Topics": [
          {
            "TopicName": "",
            "InstanceId": 12345,
            "TopicId": 1234,
            "TopicOwner": "9527952795****",
            "NodeId": 1234,
            "TopicStatus": "FIXING"
          }
        ],
        "Nodes": [
          {
            "Owner": "95279527952****",
            "NodeName": "",
            "NodeId": 1234,
            "ProjectId": 1234
          }
        ],
        "SlaAlert": {
          "Status": "SAFE",
          "BaselineOwner": "952795279****",
          "BaselineId": 1234,
          "BaselineName": "",
          "Bizdate": 1553443200000,
          "ProjectId": 1234,
          "InGroupId": 1
        }
      }
    ]
  }
}

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
No change history