ListAlertMessages

Updated at:

Queries a list of alerts.

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

PageNumber

integer

Yes

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

1

PageSize

integer

Yes

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

10

BeginTime

string

Yes

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

EndTime

string

Yes

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

RemindId

integer

No

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

AlertMethods

string

No

The notification method. Valid values:

  • MAIL: email.

  • SMS: text message.
    • PHONE: phone call. Supported only in DataWorks Professional Edition and higher editions.

Separate multiple notification methods with commas (,).

SMS,MAIL,PHONE

AlertUser

string

No

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

12345

AlertRuleTypes

string

No

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

BaselineId

integer

No

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 elements

Element

Type

Description

Example

object

The response parameters.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The request ID.

0000-ABCD-EFG****

ErrorMessage

string

The error message.

The specified parameters are invalid.

ErrorCode

string

The error code.

Invalid.Tenant.ConnectionNotExists

Success

boolean

Indicates whether the request was successful.

true

Data

object

The information about returned alerts.

PageNumber

string

The page number.

1

PageSize

string

The number of entries per page.

10

TotalCount

string

The total number of alerts.

100

AlertMessages

array<object>

The alerts.

array<object>

The returned data.

RemindId

integer

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

AlertMessageStatus

string

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

AlertUser

string

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

9527952795****

AlertTime

integer

The timestamp when the alert was reported.

1553531401000

AlertMethod

string

The notification method. Valid values: MAIL (email), SMS (text message), and PHONE (phone call). Only DataWorks Professional Edition and more advanced editions support the PHONE notification method.

SMS

Source

string

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

Content

string

The content of the alert.

Node error

RemindName

string

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

Custom monitoring rule name

AlertId

integer

The alert ID.

1234

Instances

array<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.

object

The information about the instance.

Status

string

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

InstanceId

integer

The instance ID.

12345

NodeName

string

The name of the node.

Node name

NodeId

integer

The node ID.

1234

ProjectId

integer

The ID of the workspace to which the node belongs.

1234

Topics

array<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.

object

The information about the event.

TopicName

string

The name of the event.

9527 error

InstanceId

integer

The ID of the instance associated with the event.

12345

TopicId

integer

The event ID.

1234

TopicOwner

string

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

9527952795****

NodeId

integer

The ID of the node associated with the event.

1234

TopicStatus

string

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 has recovered.

FIXING

Nodes

array<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.

object

The information about the node.

Owner

string

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

95279527952****

NodeName

string

The name of the node.

Node name

NodeId

integer

The node ID.

1234

ProjectId

integer

The ID of the workspace to which the node belongs.

1234

SlaAlert

object

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.

Status

string

The status of the baseline. Valid values: ERROR, SAFE, DANGROUS, 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 DANGROUS 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

BaselineOwner

string

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

952795279****

BaselineId

integer

The baseline ID.

1234

BaselineName

string

The name of the baseline.

Baseline name

Bizdate

integer

The business date timestamp of the baseline instance.

1553443200000

ProjectId

integer

The ID of the workspace to which the baseline belongs.

1234

InGroupId

integer

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

Success response

JSON format

{
  "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": "Node error",
        "RemindName": "Custom monitoring rule name",
        "AlertId": 1234,
        "Instances": [
          {
            "Status": "NOT_RUN",
            "InstanceId": 12345,
            "NodeName": "Node name",
            "NodeId": 1234,
            "ProjectId": 1234
          }
        ],
        "Topics": [
          {
            "TopicName": "9527 error",
            "InstanceId": 12345,
            "TopicId": 1234,
            "TopicOwner": "9527952795****",
            "NodeId": 1234,
            "TopicStatus": "FIXING"
          }
        ],
        "Nodes": [
          {
            "Owner": "95279527952****",
            "NodeName": "Node name",
            "NodeId": 1234,
            "ProjectId": 1234
          }
        ],
        "SlaAlert": {
          "Status": "SAFE",
          "BaselineOwner": "952795279****",
          "BaselineId": 1234,
          "BaselineName": "Baseline name",
          "Bizdate": 1553443200000,
          "ProjectId": 1234,
          "InGroupId": 1
        }
      }
    ]
  }
}

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 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
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.