Queries alerts.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListAlertMessages

The operation that you want to perform. Set the value to ListAlertMessages.

PageNumber Integer Yes 1

The number of the page to return. Valid values: 1 to 30. Default value: 1.

PageSize Integer Yes 10

The number of entries to return on each page. Default value: 10. Maximum value: 100.

BeginTime String Yes 2020-04-02T00:00:00+0800

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

EndTime String Yes 2020-04-04T00:00:00+0800

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

RemindId Long No 9527

The ID of the custom alert rule. This parameter takes effect if the AlertRuleTypes parameter is set to USER_DEFINE.

You can configure either this parameter or BaselineId.

AlertMethods String No SMS,MAIL,PHONE

The notification method. Valid values:

  • MAIL: email
  • SMS: text message

    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 (,).

AlertUser String No 123456

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

AlertRuleTypes String No GLOBAL,USER_DEFINE,OTHER

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 (,).

BaselineId Long No 1234

The ID of the baseline. This parameter takes effect if the AlertRuleTypes parameter is set to GLOBAL.

You can configure either this parameter or RemindId.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0000-ABCD-EFG****

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

ErrorMessage String The specified parameters are invalid.

The error message returned.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

Success Boolean true

Indicates whether the request was successful.

Data Object

The information about returned alerts.

PageNumber String 1

The page number of the returned page.

PageSize String 10

The number of entries returned per page.

TotalCount String 100

The total number of returned alerts.

AlertMessages Array of AlertMessages

The alerts.

RemindId Long 1234

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

AlertMessageStatus String READY_TO_SEND

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.

AlertUser String 9527952795****

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

AlertTime Long 1553531401000

The timestamp when the alert was reported.

AlertMethod String SMS

The notification method. Valid values: MAIL, SMS, and PHONE. The value MAIL indicates that the notification is sent by email. The value SMS indicates that the notification is sent by text message. The value PHONE indicates that the notification is sent by phone call. Only DataWorks Professional Edition and more advanced editions support the PHONE notification method.

Source String REMIND_ALERT

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.

Content String Errors on a node

The content of the alert.

RemindName String Name of the custom alert rule

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

AlertId Long 1234

The ID of the alert.

Instances Array of Instances

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.

Status String NOT_RUN

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. The value CHECKING_CONDITION indicates that branch conditions are being checked for the node. The value FAILURE indicates that the instance fails to run. The value SUCCESS indicates that the instance is successfully run.

InstanceId Long 12345

The ID of the instance.

NodeName String Node name

The name of the node.

NodeId Long 1234

The ID of the node.

ProjectId Long 1234

The ID of the workspace to which the node belongs.

Topics Array of Topics

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.

TopicName String 9527 error

The name of the event.

InstanceId Long 12345

The ID of the instance that triggered the event.

TopicId Long 1234

The ID of the event.

TopicOwner String 9527952795****

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

NodeId Long 1234

The ID of the node that triggered the event.

TopicStatus String FIXING

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.

Nodes Array of Nodes

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.
Owner String 95279527952****

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

NodeName String Node name

The name of the node.

NodeId Long 1234

The ID of the node.

ProjectId Long 1234

The ID of the workspace to which the node belongs.

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 SAFE

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 time does not arrive. The value OVER indicates that nodes are still running after the committed time.

BaselineOwner String 952795279****

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

BaselineId Long 1234

The ID of the baseline.

BaselineName String Baseline name

The name of the baseline.

Bizdate Long 1553443200000

The data timestamp of the baseline instance.

ProjectId Long 1234

The ID of the workspace to which the baseline belongs.

InGroupId Integer 1

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListAlertMessages
&PageNumber=1
&PageSize=10
&BeginTime=2020-04-02T00:00:00+0800
&EndTime=2020-04-04T00:00:00+0800
&RemindId=9527
&AlertMethods=SMS,MAIL,PHONE
&AlertUser=123456
&AlertRuleTypes=GLOBAL,USER_DEFINE,OTHER
&BaselineId=1234
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListAlertMessagesResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>0000-ABCD-EFG****</RequestId>
    <ErrorMessage>The specified parameters are invalid.</ErrorMessage>
    <ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
    <Success>true</Success>
    <Data>
        <PageNumber>1</PageNumber>
        <PageSize>10</PageSize>
        <TotalCount>100</TotalCount>
        <AlertMessages>
            <RemindId>1234</RemindId>
            <AlertMessageStatus>READY_TO_SEND</AlertMessageStatus>
            <AlertUser>9527952795****</AlertUser>
            <AlertTime>1553531401000</AlertTime>
            <AlertMethod>SMS</AlertMethod>
            <Source>REMIND_ALERT</Source>
            <Content>Errors on a node</Content>
            <RemindName>Name of the custom alert rule</RemindName>
            <AlertId>1234</AlertId>
            <Instances>
                <Status>NOT_RUN</Status>
                <InstanceId>12345</InstanceId>
                <NodeName>Node name</NodeName>
                <NodeId>1234</NodeId>
                <ProjectId>1234</ProjectId>
            </Instances>
            <Topics>
                <TopicName>9527 error</TopicName>
                <InstanceId>12345</InstanceId>
                <TopicId>1234</TopicId>
                <TopicOwner>9527952795****</TopicOwner>
                <NodeId>1234</NodeId>
                <TopicStatus>FIXING</TopicStatus>
            </Topics>
            <Nodes>
                <Owner>95279527952****</Owner>
                <NodeName>Node name</NodeName>
                <NodeId>1234</NodeId>
                <ProjectId>1234</ProjectId>
            </Nodes>
            <SlaAlert>
                <Status>SAFE</Status>
                <BaselineOwner>952795279****</BaselineOwner>
                <BaselineId>1234</BaselineId>
                <BaselineName>Baseline name</BaselineName>
                <Bizdate>1553443200000</Bizdate>
                <ProjectId>1234</ProjectId>
                <InGroupId>1</InGroupId>
            </SlaAlert>
        </AlertMessages>
    </Data>
</ListAlertMessagesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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": "Errors on a node",
      "RemindName" : "Name of the custom alert rule",
      "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
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or DataWorks Ultimate Edition.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has exceeded the upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The error message returned because the number of requests per day for the resource has exceeded the upper limit.
429 Throttling.Resource You have reached the limit for the resource. Please contact us by submitting a ticket. The error message returned because your quota for the resource has been used up. Submit a ticket.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted within a short period of time. Try again later.
500 Forbidden.Not.Server The dataworksAPI service is not available in this area. Please try it in another area. The error message returned because DataWorks API is unavailable in this region. Try another region.
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.

For a list of error codes, visit the API Error Center.