You need to enable JavaScript to run this app.
导航

ListSendAlert

最近更新时间2024.04.10 15:10:55

首次发布时间2022.10.27 19:53:20

调用ListSendAlert接口查询告警通知的历史发送列表。

Request URL

POST https://open.volcengineapi.com?Action=ListSendAlert&Version=2018-01-01

ServiceName : Volc_Observe
Region : cn-beijing 
AccessKey : xxx
SecretKey : xxx

请求参数

参数

类型

是否必填

示例值

描述

AlertGroupId

String

633508858e241506ac******

告警组的ID。调用ListAlertGroup接口查看取值。

PageNumber

Interger

1

从第几页开始。
如果不填则不分页。

PageSize

Interger

10

每页的数据行数。
如果不填则只返回前10条。

返回参数

参数

类型

示例值

说明

Data

Array

-

返回数据。具体格式,请参见Data数据结构

PageNumber

Interger

1

当前页码。

PageSize

Interger

10

当前分页的行数。

TotalCount

Interger

2

时间段内的告警记录总数。

Data数据结构

参数

类型

示例值

说明

Id

String

63340e8f4f5b3bdee9b*****

历史告警ID。

SendAt

String

2022-09-28T09:06:23.65Z

历史告警发送时间。

SendResult

Array

-

历史告警的内容。具体格式,请参见SendResult数据结构

SendResult数据结构

参数

类型

示例值

描述

Receiver

String

63329d689e5b169425******

告警发送记录的ID。

Success

String

true

此告警消息发送结果。

  • true:发送成功
  • false:发送失败

AlertMethod

String

API

告警发送的通知方式。

  • Email:邮件
  • Phone:电话
  • SMS:短信
  • API:告警回调

ErrMsg

String

-

错误消息。
如果为空,表示没有错误。

请求示例

POST https://open.volcengineapi.com?Action=ListSendAlert&Version=2018-01-01
ServiceName=Volc_Observe
Region=cn-beijing 
AccessKey=xxx 
SecretKey=xxx 

{
    "Namespace":"VCM_Kafka",
    "AlertGroupId":"6332a1ed9e5b169425******",
    "PageNumber":1,
    "PageSize":10,
    "Filter":""
}

返回示例

{
    "ResponseMetadata":{
        "RequestId":"20230****44C52",
        "Action":"ListSendAlert",
        "Version":"2018-01-01",
        "Service":"Volc_Observe",
        "Region":"cn-beijing"
    },
    "Result":{
        "Data":[
            {
                "Id":"63340e8f4f5b3bdee9b*****",
                "SendAt":"2022-09-28T09:06:23.65Z",
                "SendResult":[
                    {
                        "Receiver":"abc@11.com",
                        "AlertMethod":"Email",
                        "Success":true,
                        "ErrMsg":""
                    },
                    {
                        "Receiver":"1503875****",
                        "AlertMethod":"SMS",
                        "Success":true,
                        "ErrMsg":""
                    }
                ]
            },
            {
                "Id":"633508998e241506acc*****",
                "SendAt":"2022-09-29T02:53:13.9Z",
                "SendResult":[
                    {
                        "Receiver":"https://open.cn/open-apis/bot/v2/hook/1356***302d3e5e",
                        "AlertMethod":"API",
                        "Success":false,
                        "ErrMsg":""
                    }
                ]
            }
        ],
        "PageNumber":1,
        "PageSize":10,
        "TotalCount":2
    }
}