{
  "tags": [
    "DNS 管理"
  ],
  "description": "按路径中的 DNS API ID 删除凭据。支持以英文逗号传入多个 ID；普通用户只能删除自己的记录，管理员可删除其他用户记录。任一记录无效、被证书或网站引用、被设置为证书默认 DNS API 时均拒绝删除并回滚本次事务。",
  "operationId": "user_delete_v1_dnsapis_api_id",
  "security": [
    {
      "AccessToken": []
    },
    {
      "ApiKey": [],
      "ApiSecret": []
    }
  ],
  "responses": {
    "200": {
      "description": "业务结果使用 HTTP 200 返回。成功时 data 为 null；ID 格式、记录、归属、引用关系、默认配置、权限或认证校验失败时返回业务错误码。",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "code",
                  "msg",
                  "data"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "enum": [
                      0
                    ],
                    "description": "成功状态码，固定为 0。"
                  },
                  "msg": {
                    "type": "string",
                    "enum": [
                      "dnsapi删除成功"
                    ],
                    "description": "删除成功提示。"
                  },
                  "data": {
                    "type": "object",
                    "nullable": true,
                    "additionalProperties": false,
                    "description": "成功时固定为 null。"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "code",
                  "msg",
                  "data"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "dnsapi-1",
                      "dnsapi-2",
                      "dnsapi-3",
                      "dnsapi-32",
                      "dnsapi-34",
                      "dnsapi-35",
                      "login_required"
                    ],
                    "description": "ID 格式/记录/引用/默认配置/管理员权限或认证失败的业务错误码。"
                  },
                  "msg": {
                    "type": "string",
                    "description": "删除前校验失败原因。"
                  },
                  "data": {
                    "type": "string",
                    "enum": [
                      ""
                    ],
                    "description": "业务错误时固定为空字符串。"
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "example": {
            "code": 0,
            "msg": "dnsapi删除成功",
            "data": null
          }
        }
      }
    }
  },
  "x-python-handler": "site.DNSAPI",
  "x-python-route-line": 352,
  "x-audience": "user",
  "x-auth": "user",
  "x-reviewed": true,
  "parameters": [
    {
      "name": "api_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[0-9]+(,[0-9]+)*$"
      },
      "description": "要删除的一个或多个 DNS API 记录 ID，多个 ID 使用英文逗号分隔。",
      "example": "3001,3002"
    }
  ],
  "x-itecdn-source-reviewed": true,
  "extensions": [
    {
      "key": "x-python-handler",
      "value": "site.DNSAPI"
    },
    {
      "key": "x-python-route-line",
      "value": 352
    },
    {
      "key": "x-audience",
      "value": "user"
    },
    {
      "key": "x-auth",
      "value": "user"
    },
    {
      "key": "x-reviewed",
      "value": true
    },
    {
      "key": "x-itecdn-source-reviewed",
      "value": true
    }
  ],
  "method": "delete",
  "path": "/v1/dnsapis/{api_id}",
  "servers": [
    {
      "url": "https://master.example.invalid",
      "description": "不可调用的示例地址；复制示例后替换为自己的主控域名。"
    }
  ],
  "securitySchemes": {
    "AccessToken": {
      "type": "apiKey",
      "in": "header",
      "name": "access-token",
      "description": "通过登录接口获得的短期访问令牌。"
    },
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "api-key",
      "description": "API Key；必须和 api-secret 同时发送。"
    },
    "ApiSecret": {
      "type": "apiKey",
      "in": "header",
      "name": "api-secret",
      "description": "API Secret；必须和 api-key 同时发送。"
    }
  },
  "info": {
    "title": "itecdn v5 用户 API",
    "version": "5.x",
    "description": "itecdn v5.x Python 主控用户 API。本文档不适用于 v6 或其它实现。"
  },
  "postman": {
    "name": "删除一个或多个 DNS 服务商凭据",
    "description": {
      "content": "按路径中的 DNS API ID 删除凭据。支持以英文逗号传入多个 ID；普通用户只能删除自己的记录，管理员可删除其他用户记录。任一记录无效、被证书或网站引用、被设置为证书默认 DNS API 时均拒绝删除并回滚本次事务。",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "v1",
        "dnsapis",
        ":api_id"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": [
        {
          "disabled": false,
          "description": {
            "content": "(Required) 要删除的一个或多个 DNS API 记录 ID，多个 ID 使用英文逗号分隔。",
            "type": "text/plain"
          },
          "type": "any",
          "value": "",
          "key": "api_id"
        }
      ]
    },
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "method": "DELETE",
    "auth": {
      "type": "apikey",
      "apikey": [
        {
          "type": "any",
          "value": "access-token",
          "key": "key"
        },
        {
          "type": "any",
          "value": "{{apiKey}}",
          "key": "value"
        },
        {
          "type": "any",
          "value": "header",
          "key": "in"
        }
      ]
    }
  }
}