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

ListContactGroups

最近更新时间2024.04.19 11:53:54

首次发布时间2023.06.30 15:23:34

获取告警联系人组列表。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com/?Action=ListContactGroups&Version=2021-03-03

请求参数

参数名称类型是否必选示例值描述
ActionStringListContactGroups公共参数,本接口值:ListContactGroups。
VersionString2021-03-03公共参数,本接口值:2021-03-03。
PageNumberInteger1当前页数,最小值或默认值均为 1。

PageSize

Integer

10

单页数量:

  • 取值范围为 0~100。
  • 默认值为 10。
FilterObject ContactGroupFilter-联系人组过滤条件。

ContactGroupFilter

参数名称类型是否必选示例值描述

Ids

Array of String

["f9626b5a-0c9e-420e-b6e5-4c66b84f080d"]

按联系人组 ID 过滤,精确查询。

NameString"test"按联系人组名称过滤,模糊查询。

请求示例

POST /?Action=ListContactGroups&Version=2021-03-03
Content-Type:application/json
{
    "PageNumber": 1,
    "PageSize": 10,
    "Filter": {
        "Ids": ["f9626b5a-0c9e-420e-b6e5-4c66b84f080d"],
        "Name": "test"
    }
}

返回参数

参数名称类型示例值描述
TotalInteger100联系人组总数。
ItemsArray of ContactGroup-联系人组列表。

ContactGroup

参数名称类型示例值描述
IdStringf9626b5a-0c9e-420e-b6e5-4c66b84f080d联系人组 ID。

Name

String

test

联系人组名称。

ContactIds

Array of String

["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"]

属于该联系人组的联系人 ID 列表。

CreateTimeString2020-01-01T00:00:00Z联系人组创建时间,RFC3339 格式。

返回示例

HTTP/1.1 200 OK
Content-Type:application/json
{
    "ResponseMetadata": {
        "RequestId": "202211302208xxxx",
        "Action": "ListContactGroups",
        "Version": "2021-03-03",
        "Service": "vmp",
        "Region": "cn-beijing"
    },
    "Result": {
        "Total": 100,
        "Items": [
            {
                "Id": "f9626b5a-0c9e-420e-b6e5-4c66b84f080d",
                "Name": "test",
                "ContactIds":  ["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"],
                "CreateTime": "2020-01-01T00:00:00Z"
            }
        ]
    }
}

错误码

本接口错误码如下表所示,公共错误码请参见 公共错误码

HTTP 状态码错误码错误信息描述

400

InvalidParameter.{{parameter}}

The specified {{parameter}} is invalid.

参数不合法,请检查参数正确性后重试。

403ProductUnsubscribedYou are not subscribed to the Volcengine Managed Service for Prometheus (VMP). Please go to the VMP console web page to subscribe to the service当前账号未订阅 VMP 服务。