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

DeleteContacts

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

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

删除告警联系人。

请求说明

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

请求参数

参数名称类型是否必选示例值描述
ActionStringDeleteContacts公共参数,本接口值:DeleteContacts。
VersionString2021-03-03公共参数,本接口值:2021-03-03。
IdsArray of String["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"]联系人 ID。

请求示例

POST /?Action=DeleteContacts&Version=2021-03-03
Content-Type:application/json
{
    "Ids":  ["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"]
}

返回参数

参数名称类型示例值描述

SuccessfulItems

Array of String

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

成功删除的联系人 ID。

UnsuccessfulItemsArray of UnsuccessfulItem-未成功删除的联系人信息。

UnsuccessfulItem

参数名称类型示例值描述
IdString603c20ce-e0eb-4206-90ef-7962b95c0afa未成功删除的联系人 ID。
ErrorObject UnsuccessfulItemError-未成功删除的原因。

UnsuccessfulItemError

参数名称类型示例值描述
CodeStringNotFound.Ids错误码。
MessageStringThe specified Contact {{id}} is not found.错误信息。
DataMap[String]String-错误元数据。

返回示例

HTTP/1.1 200 OK
Content-Type:application/json
{
    "ResponseMetadata": {
        "RequestId": "202211302208xxxx",
        "Action": "DeleteContacts",
        "Version": "2021-03-03",
        "Service": "vmp",
        "Region": "cn-beijing"
    },
    "Result": {
        "SuccessfulItems": ["4a337d5b-0959-4cc7-a3ea-2f71332d4ff3"],
        "UnsuccessfulItems": [
            {
                "Id": "603c20ce-e0eb-4206-90ef-7962b95c0afa",
                "Error": {
                    "Code": " NotFound.Ids",
                    "Message": "The specified Contact {{id}} is not found.",
                    "Data": 
                }
            }
        ]
    }
}

错误码

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

HTTP 状态码错误码错误信息描述
400MissingParameter.{{parameter}}The required parameter {{parameter}} is missing.缺少必要的参数。
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 服务。
404NotFound.IdThe specified Contact {{Id}} is not found.未找到指定联系人。