最近更新时间:2024.04.19 11:53:53
首次发布时间:2023.06.30 15:23:34
获取告警联系人列表。
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListContacts | 公共参数,本接口值:ListContacts。 |
Version | String | 是 | 2021-03-03 | 公共参数,本接口值:2021-03-03。 |
PageNumber | Integer | 否 | 1 | 当前页数,最小值或默认值均为 1。 |
PageSize | Integer | 否 | 10 | 单页数量:
|
Filter | Object ContactFilter | 否 | - | 联系人过滤条件。 |
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Ids | Array of String | 否 | ["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"] | 按联系人 ID 过滤,精确查询。 |
Name | String | 否 | test | 按联系人名称过滤,模糊查询。 |
String | 否 | test@123.com | 按联系人邮箱过滤,模糊查询。 |
POST /?Action=ListContacts&Version=2021-03-03 Content-Type:application/json { "PageNumber": 1, "PageSize": 10, "Filter": { "Ids": ["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"], "Name": "test", "Email": "test@123.com" } }
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Total | Integer | 100 | 联系人总数。 |
Items | Array of Contact | - | 联系人列表。 |
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | 4a337d5b-0959-4cc7-a3ea-2f71332d4ff3 | 联系人 ID。 |
Name | String | test | 联系人名称。 |
String | test@123.com | 联系人邮箱。 | |
Webhook | Object Webhook | 联系人通用 Webhook。 | |
ContactGroupIds | Array of String | ["f9626b5a-0c9e-420e-b6e5-4c66b84f080d"] | 联系人所属联系人组 ID。 |
LarkBotWebhook | Object LarkBotWebhook | - | 联系人飞书群组机器人 Webhook。 |
DingTalkBotWebhook | Object DingTalkBotWebhook | - | 联系人钉钉群组机器人 Webhook。 |
EmailActive | Boolean | true | 联系人邮箱是否被激活,取值:
|
CreateTime | String | 2020-01-01T00:00:00Z | 联系人创建时间,RFC3339 格式。 |
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Address | String | https://www.bytedance.com/ | 通用 Webhook 地址。 |
Token | String | 3KSxxx | 通用 Webhook token。 |
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Address | String | https://open.feishu.cn/open-apis/bot/v2/hook/xxx | 飞书群组机器人 Webhook 地址。 |
SecretKey | String | 6KKxxx | 飞书群组机器人 Webhook 秘钥。 |
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Address | String | https://oapi.dingtalk.com/robot/send?access_token=xxx | 钉钉群组机器人 Webhook 地址。 |
SecretKey | String | SECxxx | 钉钉群组机器人 Webhook 秘钥。 |
AtMobiles | Array of String | ["133********"] | 被@人的手机号。 |
AtUserIds | Array of String | ["********"] | 被@人的用户 ID。 |
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "202211302208xxxx", "Action": "ListContacts", "Version": "2021-03-03", "Service": "vmp", "Region": "cn-beijing" }, "Result": { "Total": 100, "Items": [ { "Id": "4a337d5b-0959-4cc7-a3ea-2f71332d4ff3", "Name": "test", "Email": "test@123.com", "Webhook": { "Address": "https://www.bytedance.com/", "Token": "xxxxxxxx" }, "ContactGroupIds": ["f9626b5a-0c9e-420e-b6e5-4c66b84f080d"], "LarkBotWebhook": { "Address": "https://open.feishu.cn/open-apis/bot/v2/hook/xxx", "SecretKey": "6KKxxx" }, "DingTalkBotWebhook": { "Address": "https://oapi.dingtalk.com/robot/send?access_token=xxx", "SecretKey": "SECxxx", "AtMobiles": ["133********"], "AtUserIds": ["********"] }, "EmailActive": true, "CreateTime": "2020-01-01T00:00:00Z" } ] } }
本接口错误码如下表所示,公共错误码请参见 公共错误码。
HTTP 状态码 | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParameter.{{parameter}} | The specified {{parameter}} is invalid. | 参数不合法,请检查参数正确性后重试。 |
403 | ProductUnsubscribed | You 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 服务。 |