You need to enable JavaScript to run this app.
导航
ListNotifications
最近更新时间:2025.04.14 14:43:15首次发布时间:2025.04.14 14:43:15
我的收藏
有用
有用
无用
无用

查询通知策略列表。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com?Action=ListNotifications&Version=2018-01-01

调试

请求参数

参数类型是否必选示例值描述
ActionStringListNotifications接口名称。当前 API 的名称为 ListNotifications
VersionString2018-01-01接口版本。当前 API 的版本为 2018-01-01
NameStringnotification-demo基于告警通知策略名称进行筛选。

Levels

Array of String

notice

基于告警通知等级进行筛选,取值:

  • notice:通知
  • warning:警告
  • critical:严重
  • recovery:恢复

RuleIds

Array of String

189898***00

基于告警通知策略 ID 进行筛选。
可以调用 ListNotifications 接口,获取通知策略 ID。

PageNumber

Integer

1

列表的页码,默认值为1。要查询的列表范围为:

  • 实际起始位置 = (PageNumber-1) * PageSize
  • 实际终止位置 = PageNumber * PageSize
PageSizeInteger10分页查询时每页的行数,取值 > 0 ,默认值为 10。

请求示例

POST https://open.volcengineapi.com?Action=ListNotifications&Version=2018-01-01
Content-Type: application/json
{
    "Name": "notification-demo",
    "Levels": [
        "notice"
    ],
    "RuleIds": [
        "189898***00"
    ],
    "PageNumber": 1,
    "PageSize": 10
}

返回参数

参数类型示例值描述
DataArray of Notification-通知策略详情。

Notification

参数类型示例值描述
IdString189898***00通知策略 ID。
NameStringnotification-demo通知策略名称。
LevelsArray of Stringnotice告警通知等级。
CreatedAtString2021-10-20T20:27:53+08:00通知策略的创建时间。
UpdatedAtString2021-10-20T20:27:53+08:00通知策略的更新时间。
EffectEndAtString23:59通知策略生效的截止时间,格式为HH:MM,例如:23:59。
EffectStartAtString00:00通知策略生效的开始时间,格式为HH:MM,例如:00:00。
NotificationsArray of NotificationNotify-分级告警通知策略详情。

NotificationNotify

参数类型示例值描述
LevelStringcritical告警等级。
WebhookIdsArray of String18913208***4528Webhook 回调 ID。
AlertMethodsArray of StringEmail告警通知方式。
ContactGroupIdsArray of String145080093687100****告警联系组 ID。

返回示例

{
    "ResponseMetadata": {
        "Action": "ListNotifications",
        "Region": "cn-beijing",
        "Service": "Volc_Observe",
        "Version": "2018-01-01",
        "RequestId": "20230604110420****100232280022D31"
    },
    "Result": {
        "Data": [
            {
                "Id": "189898***00",
                "Name": "notification-demo",
                "Levels": [
                    "notice"
                ],
                "CreatedAt": "2021-10-20T20:27:53+08:00",
                "UpdatedAt": "2021-10-20T20:27:53+08:00",
                "EffectEndAt": "23:59",
                "EffectStartAt": "00:00",
                "Notifications": [
                    {
                        "Level": "critical",
                        "WebhookIds": [
                            "18913208***4528"
                        ],
                        "AlertMethods": [
                            "Email"
                        ],
                        "ContactGroupIds": [
                            "145080093687100****"
                        ]
                    }
                ]
            }
        ],
        "PageSize": 30,
        "PageNumber": 1,
        "TotalCount": 2
    }
}

错误码

本接口无特有的错误码。更多信息请参见 错误码