ListAlertMessages

Updated at:

Queries a list of alert messages.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

list

*All Resource

*

None None

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 start time of the alert. Specify the time 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 time of the alert. Specify the time 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 ID of the custom rule. This parameter takes effect when the AlertRuleTypes is set to USER_DEFINE. You can specify either this parameter or the BaselineId parameter.

9527

AlertMethods

string

No

The alert 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 Alibaba Cloud UID of the alert recipient.

12345

AlertRuleTypes

string

No

The rule type. Valid values:

  • GLOBAL: Global rule.

  • USER_DEFINE: Custom rule.

  • OTHER: Other. Separate multiple rule types with commas (,).

GLOBAL,USER_DEFINE,OTHER

BaselineId

integer

No

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

1234

Response elements

Element

Type

Description

Example

object

The response.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

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

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 list of returned alert messages.

PageNumber

string

The current page number.

1

PageSize

string

The number of entries per page.

10

TotalCount

string

The total number of alert messages.

100

AlertMessages

array<object>

The list of alert messages.

array<object>

The alert message.

RemindId

integer

The ID of the triggered custom monitoring rule. This parameter is returned when the Source parameter is set to REMIND_ALERT.

1234

AlertMessageStatus

string

The sending status. Valid values:

  • READY_TO_SEND: Ready to send.

  • SEND_FAIL: Failed to send.

  • SEND_SUCCESS: Sent successfully.

  • SEND_OVERLIMIT: Alert limit exceeded.

READY_TO_SEND

AlertUser

string

The Alibaba Cloud UID of the recipient.

9527952795****

AlertTime

integer

The timestamp of the alert.

1553531401000

AlertMethod

string

The alert notification method. Valid values:

  • MAIL: Email.

  • SMS: Text message.

  • PHONE: Phone call. Supported only in DataWorks Professional Edition and higher editions.

SMS

Source

string

The alerting source. Valid values:

  • REMIND_ALERT: Custom alerting.

  • TOPIC_ALERT: Event alerting.

  • SLA_ALERT: Baseline alerting.

  • NODE_CYCLE_ALERT: Node loop alerting.

  • NODE_LONELY_ALERT: Isolated node alerting.

REMIND_ALERT

Content

string

The content of the alert.

Node error

RemindName

string

The name of the triggered custom monitoring rule. This parameter is returned when the Source parameter is set to REMIND_ALERT.

Custom monitoring rule name

AlertId

integer

The alert ID.

1234

Instances

array<object>

The list of instances that triggered the custom monitoring rule. This parameter is returned when the Source parameter is set to REMIND_ALERT. For other alert sources, this parameter is empty.

object

The instance information.

Status

string

The instance status. Valid values:

  • NOT_RUN: Not run.

  • WAIT_TIME: Waiting for the scheduled time.

  • WAIT_RESOURCE: Waiting for resources.

  • RUNNING: Running.

  • CHECKING: Checking.

  • CHECKING_CONDITION: Checking conditions.

  • FAILURE: Failed.

  • SUCCESS: Successful.

NOT_RUN

InstanceId

integer

The instance ID.

12345

NodeName

string

The node name.

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 list of events that triggered the alerting. This parameter is returned when the Source parameter is set to TOPIC_ALERT (global event alerting). For other alerting sources, this parameter is empty.

object

The event information.

TopicName

string

The event name.

9527 error

InstanceId

integer

The instance ID associated with the event.

12345

TopicId

integer

The event ID.

1234

TopicOwner

string

The Alibaba Cloud UID of the event owner.

9527952795****

NodeId

integer

The ID of the node associated with the event.

1234

TopicStatus

string

The event status. Valid values:

  • IGNORE: Ignored.

  • NEW: New.

  • FIXING: Fixing.

  • RECOVER: Recovered.

FIXING

Nodes

array<object>

Different alert sources return different node lists:

  • If Source (alert source) is NODE_CYCLE_ALERT (node cycle alert), the types of nodes that form a cycle are returned.

  • If Source (alert source) is NODE_LONELY_ALERT (isolated node alert), the types of isolated nodes are returned.

object

The node information.

Owner

string

The Alibaba Cloud UID of the node owner.

95279527952****

NodeName

string

The node name.

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 instance information that triggered the baseline alert. This parameter is returned when the Source parameter is set to SLA_ALERT. For other alert sources, this parameter is empty.

Status

string

The baseline status. Valid values:

  • ERROR: Error.

  • SAFE: Safe.

  • DANGROUS: Warning.

  • OVER: Breached.

SAFE

BaselineOwner

string

The Alibaba Cloud UIDs of the baseline owners. Multiple UIDs are separated by commas (,).

952795279****

BaselineId

integer

The baseline ID.

1234

BaselineName

string

The baseline name.

Baseline name

Bizdate

integer

The timestamp of the business date of the baseline instance.

1553443200000

ProjectId

integer

The ID of the workspace to which the baseline belongs.

1234

InGroupId

integer

The cycle number of the baseline instance. The value is 1 for daily baselines and ranges from 1 to 24 for hourly baselines.

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