全部產品
Search
文件中心

DataWorks:ListAlertMessages - 擷取警示資訊的列表

更新時間:Mar 21, 2026

調用ListAlertMessages擷取警示資訊的列表。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

PageNumber

integer

分頁的頁數。預設值為 1、最小值為 1、最大值為 30。

1

PageSize

integer

每頁顯示的條數,預設為 10,最大 100 條。

10

BeginTime

string

起始警示時間,需要使用 yyyy-MM-dd'T'HH:mm:ssZ 的 UTC 格式。

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

EndTime

string

截止警示時間,需要使用 yyyy-MM-dd'T'HH:mm:ssZ 的 UTC 格式。

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

RemindId

integer

自訂規則的 ID,當 AlertRuleTypes 參數配置為 USER_DEFINE 自訂規則時生效。 該參數與 BaselineId 參數配置一個即可。

9527

AlertMethods

string

警示方式,取值如下:

  • MAIL:郵件。

  • SMS:簡訊。 可使用簡訊警示的地區為:新加坡、馬來西亞(吉隆坡)、德國(法蘭克福)。

多個警示方式之間使用英文逗號(,)分隔。

SMS,MAIL,PHONE

AlertUser

string

警示接收人的阿里雲 UID。

12345

AlertRuleTypes

string

規則類型,包括 GLOBAL(全域規則)、USER_DEFINE(自訂規則)和 OTHER(其它)。多個規則類型之間使用英文逗號(,)分隔。

GLOBAL,USER_DEFINE,OTHER

BaselineId

integer

基準 ID。當 AlertRuleTypes 參數配置為 GLOBAL 時生效。 該參數與 RemindId 參數配置一個即可。

1234

返回參數

名稱

類型

描述

樣本值

object

返回結果。

HttpStatusCode

integer

HTTP 返回碼。

200

RequestId

string

本次調用的唯一 ID。出現錯誤後,您可以根據該 ID 排查問題。

0000-ABCD-EFG****

ErrorMessage

string

錯誤資訊。

The specified parameters are invalid.

ErrorCode

string

錯誤碼。

Invalid.Tenant.ConnectionNotExists

Success

boolean

調用是否成功。

true

Data

object

返回的警示資訊列表。

PageNumber

string

當前的頁數。

1

PageSize

string

每頁的大小。

10

TotalCount

string

警示資訊的總數。

100

AlertMessages

array<object>

警示資訊列表。

array<object>

返回資料。

RemindId

integer

當 Source(警示來源)為 REMIND_ALERT(自訂警示)時,返回觸發的自訂監控規則 ID。

1234

AlertMessageStatus

string

發送狀態,包括 READY_TO_SEND(準備發送)、SEND_FAIL(發送失敗)、SEND_SUCCESS(發送成功)和 SEND_OVERLIMIT(警示超限)。

READY_TO_SEND

AlertUser

string

接收人的阿里雲 UID。

9527952795****

AlertTime

integer

警示的時間戳記。

1553531401000

AlertMethod

string

警示方式,包括 MAIL(郵件)、SMS(簡訊)和 PHONE(電話,僅 DataWorks 專業版及以上版本支援)。

SMS

Source

string

警示來源,包括 REMIND_ALERT(自訂警示)、TOPIC_ALERT(事件警示)、SLA_ALERT(基準預警)、NODE_CYCLE_ALERT(節點成環警示)和 NODE_LONELY_ALERT(節點孤立警示)。

REMIND_ALERT

Content

string

警示的內容。

Node error

RemindName

string

當 Source(警示來源)為 REMIND_ALERT(自訂提醒)時,返回觸發的自訂監控規則名稱。

Custom monitoring rule name

AlertId

integer

警示 ID。

1234

Instances

array<object>

當 Source(警示來源)為 REMIND_ALERT(自訂提醒)時,返回觸發自訂監控規則的執行個體列表。其它類型的警示來源返回為空白。

object

執行個體資訊。

Status

string

執行個體狀態,包括 NOT_RUN (未運行)、WAIT_TIME(等待時間)、WAIT_RESOURCE(等待資源)、RUNNING(運行中)、CHECKING(校檢中)、CHECKING_CONDITION(條件檢測中)、FAILURE(運行失敗)和 SUCCESS(運行成功)。

NOT_RUN

InstanceId

integer

執行個體的 ID。

12345

NodeName

string

節點的名稱。

Node name

NodeId

integer

節點的 ID。

1234

ProjectId

integer

節點所在工作空間的 ID。

1234

Topics

array<object>

當 Source(警示來源)為 TOPIC_ALERT(全域事件警示)時,返回觸發警示的事件列表。當警示來源為其它類型時,返回結果為空白。

object

事件資訊。

TopicName

string

事件的名稱。

9527 error

InstanceId

integer

事件關聯的執行個體 ID。

12345

TopicId

integer

事件的 ID。

1234

TopicOwner

string

事件責任人的阿里雲 UID。

9527952795****

NodeId

integer

事件關聯的節點 ID。

1234

TopicStatus

string

事件狀態,包括 IGNORE(已忽略),NEW(新發現)、 FIXING(處理中)和 RECOVER(已恢複)。

FIXING

Nodes

array<object>

不同的警示來源返回不同的節點列表:

  • 當 Source(警示來源)為 NODE_ CYCLE_ALERT(節點成環警示)時,返回成環的節點類型。

  • 當 Source(警示來源)為 NODE_LONELY_ALERT(節點孤立警示)時,返回孤立的節點類型。

object

節點資訊。

Owner

string

節點責任人的阿里雲 UID。

95279527952****

NodeName

string

節點的名稱。

Node name

NodeId

integer

節點的 ID。

1234

ProjectId

integer

節點所在工作空間的 ID。

1234

SlaAlert

object

當 Source(警示來源)為 SLA_ALERT(基準警示)時,返回觸發基準預警的基本執行個體資訊。當警示來源為其它類型時,返回為空白。

Status

string

基準狀態,包括 ERROR(異常)、SAFE(安全)、DANGROUS(預警)和 OVER(破線)。

SAFE

BaselineOwner

string

基準責任人的阿里雲 UID,多個 UID 之間使用英文逗號(,)分隔。

952795279****

BaselineId

integer

基準的 ID。

1234

BaselineName

string

基準的名稱。

Baseline name

Bizdate

integer

基準執行個體的業務日期時間戳記。

1553443200000

ProjectId

integer

基準所在工作空間的 ID。

1234

InGroupId

integer

基準執行個體的周期號:Apsara Infrastructure Management Framework線為 1,小時基準範圍為[1,24]。

1

樣本

正常返回樣本

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": "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
        }
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情