{
  "tags": [
    "网站管理"
  ],
  "description": "删除一个或多个网站。路径参数可使用单个网站 ID，也可使用英文逗号分隔的多个 ID。每个网站都必须存在、属于当前用户（否则需管理员权限）、处于禁用状态，且没有未完成的网站同步任务；任一项目不满足条件时整个请求会回滚。",
  "operationId": "user_delete_v1_sites_site_id",
  "security": [
    {
      "AccessToken": []
    },
    {
      "ApiKey": [],
      "ApiSecret": []
    }
  ],
  "responses": {
    "200": {
      "description": "请求已被处理。成功时 `code` 为 0、`msg` 为“网站删除成功”、`data` 为 null；即使 ID 无效、网站不存在、网站未禁用、任务未完成或无权限，也返回 HTTP 200。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "code",
              "msg",
              "data"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "description": "业务状态码；成功为 0。",
                "example": 0
              },
              "msg": {
                "type": "string",
                "description": "处理结果说明。",
                "example": "网站删除成功"
              },
              "data": {
                "type": "string",
                "nullable": true,
                "description": "成功时为 null；失败时为空字符串。",
                "example": null
              }
            }
          },
          "examples": {
            "success": {
              "summary": "删除成功",
              "value": {
                "code": 0,
                "msg": "网站删除成功",
                "data": null
              }
            },
            "mustDisable": {
              "summary": "网站仍启用",
              "value": {
                "code": "site-4",
                "msg": "请先禁用再删除",
                "data": ""
              }
            },
            "taskPending": {
              "summary": "任务未完成",
              "value": {
                "code": "site-5",
                "msg": "网站正在处理，请稍后再操作",
                "data": ""
              }
            }
          },
          "example": {
            "code": 0,
            "msg": "网站删除成功",
            "data": null
          }
        }
      }
    }
  },
  "x-python-handler": "site.SiteAPI",
  "x-python-route-line": 569,
  "x-audience": "user",
  "x-auth": "user",
  "x-reviewed": true,
  "parameters": [
    {
      "name": "site_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[0-9]+(,[0-9]+)*$",
        "example": "101,102"
      },
      "description": "要删除的网站 ID，或以英文逗号分隔的网站 ID 列表；每一项必须是数字。"
    }
  ],
  "x-itecdn-source-reviewed": true,
  "extensions": [
    {
      "key": "x-python-handler",
      "value": "site.SiteAPI"
    },
    {
      "key": "x-python-route-line",
      "value": 569
    },
    {
      "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/sites/{site_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": "删除网站",
    "description": {
      "content": "删除一个或多个网站。路径参数可使用单个网站 ID，也可使用英文逗号分隔的多个 ID。每个网站都必须存在、属于当前用户（否则需管理员权限）、处于禁用状态，且没有未完成的网站同步任务；任一项目不满足条件时整个请求会回滚。",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "v1",
        "sites",
        ":site_id"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": [
        {
          "disabled": false,
          "description": {
            "content": "(Required) 要删除的网站 ID，或以英文逗号分隔的网站 ID 列表；每一项必须是数字。",
            "type": "text/plain"
          },
          "type": "any",
          "value": "",
          "key": "site_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"
        }
      ]
    }
  }
}