Queries the information about alerts. You can query alerts that are triggered within the last 30 days at most.

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.

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. The maximum number of entries that can be returned on each page is 100.

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

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.

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

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.

RegionId String Yes cn-shanghai

The ID of the region.

RemindId Long No 9527

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

AlertMethods String No SMS,MAIL,PHONE

The notification method. Valid values: MAIL, SMS, and PHONE. A value of MAIL indicates that the notification is sent by using emails. A value of SMS indicates that the notification is sent by using text messages. A value of PHONE indicates that the notification is sent by making phone calls. Phone calls are supported only by DataWorks Professional Edition and more advanced editions. You can specify multiple notification methods. Separate the specified notification methods with commas (,).

AlertUser String No 123456

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

AlertRuleTypes String No GLOBAL,USER_DEFINE,OHTER

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

Response parameters

Parameter Type Example Description
Data Struct

The information about returned alerts.

AlertMessages Array of AlertMessages

The alerts.

AlertId Long 1234

The ID of the alert.

AlertMessageStatus String READY_TO_SEND

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

AlertMethod String SMS

The notification method. Valid values: MAIL, SMS, and PHONE. A value of MAIL indicates that the notification is sent by using emails. A value of SMS indicates that the notification is sent by using text messages. A value of PHONE indicates that the notification is sent by making phone calls. Phone calls are supported only by DataWorks Professional Edition and more advanced editions.

AlertTime Long 1553531401000

The timestamp when the alert was reported.

AlertUser String 9527952795****

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

Content String Errors on a node

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

InstanceId Long 12345

The ID of the instance.

NodeId Long 1234

The ID of the node.

NodeName String Node name

The name of the node.

ProjectId Long 1234

The ID of the workspace to which the node belongs.

Status String NOT_RUN

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

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 from each other are returned if the value of the Source parameter is NODE_LONELY_ALERT.
NodeId Long 1234

The ID of the node.

NodeName String Node name

The name of the node.

Owner String 95279527952****

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

ProjectId Long 1234

The ID of the workspace to which the node belongs.

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.

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.

SlaAlert Struct

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.

BaselineId Long 1234

The ID of the baseline.

BaselineName String Baseline name

The name of the baseline.

BaselineOwner String 952795279****

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

Bizdate Long 1553443200000

The data timestamp of the baseline instance.

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.

ProjectId Long 1234

The ID of the workspace to which the baseline belongs.

Status String SAFE

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

Source String REMIND_ALERT

The type of the alert. Valid values: REMIND_ALERT, TOPIC_ALERT, SLA_ALERT, NODE_CYCLE_ALERT, and NODE_LONELY_ALERT. A value of REMIND_ALERT indicates that the alert is a custom alert. A value of TOPIC_ALERT indicates that the alert is an event alert. A value of SLA_ALERT indicates that the alert is a baseline alert. A value of NODE_CYCLE_ALERT indicates that the alert is a nodes-into-loop alert. A value of NODE_LONELY_ALERT indicates that the alert is a node isolation alert.

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.

InstanceId Long 12345

The ID of the instance that triggered the event.

NodeId Long 1234

The ID of the node that triggered the event.

TopicId Long 1234

The ID of the event.

TopicName String 9527 error

The name of the event.

TopicOwner String 9527952795****

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

TopicStatus String FIXING

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

PageNumber String 1

The page number of the returned page.

PageSize String 10

The number of entries returned on each page.

TotalCount String 100

The total number of returned alerts.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code.

ErrorMessage String The specified parameters are invalid.

The error message.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 0000-ABCD-EFG****

The unique ID of the request. You can troubleshoot errors based on the ID.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListAlertMessages
&BeginTime=2020-04-02T00:00:00+0800
&EndTime=2020-04-04T00:00:00+0800
&PageNumber=1
&PageSize=10
&RegionId=cn-shanghai
&RemindId=9527
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

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

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