{
  "tags": [
    "CC 防护"
  ],
  "description": "删除路径中指定的一个或多个 CC 过滤器，多个 ID 使用英文逗号分隔并在同一个数据库事务中处理。普通用户只能删除归属于自己的自定义过滤器，管理员可以删除系统内置过滤器及其他用户的过滤器。每个目标必须已经禁用；如果仍有关联的同步或删除任务，该任务状态必须为 `done`。任一 ID 格式错误、记录不存在、越权、仍启用或任务未完成时，整个批次回滚，不会保留部分删除结果。",
  "operationId": "user_delete_v1_cc_filters_filter_id",
  "security": [
    {
      "AccessToken": []
    },
    {
      "ApiKey": [],
      "ApiSecret": []
    }
  ],
  "responses": {
    "200": {
      "description": "业务结果通过 HTTP 200 返回。全部目标通过检查、删除并提交后返回确认消息；ID 格式、记录存在性、权限、启用状态或关联任务状态不符合要求，以及系统维护或认证失效时返回字符串业务错误码，整个批次事务回滚。",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "code",
                  "msg",
                  "data"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "enum": [
                      0
                    ],
                    "description": "成功状态码，所有目标过滤器删除并提交后固定为 0。"
                  },
                  "msg": {
                    "type": "string",
                    "enum": [
                      "过滤器删除成功"
                    ],
                    "description": "整个删除批次成功提交后返回的确认消息。"
                  },
                  "data": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      null
                    ],
                    "description": "删除成功时没有额外业务数据，固定为 null。"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "code",
                  "msg",
                  "data"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "cc_filter-1",
                      "cc_filter-2",
                      "cc_filter-4",
                      "cc_filter-5",
                      "cc_filter-51",
                      "cc_filter-52",
                      "maintain",
                      "login_required"
                    ],
                    "description": "业务错误码：`cc_filter-1` 表示某段 ID 不是数字，`cc_filter-2` 表示过滤器不存在，`cc_filter-4` 表示过滤器仍处于启用状态，`cc_filter-5` 表示关联任务尚未完成，`cc_filter-51` 表示非管理员删除内置过滤器，`cc_filter-52` 表示普通用户删除其他用户的过滤器，`maintain` 表示当前禁止写操作，`login_required` 表示认证无效。"
                  },
                  "msg": {
                    "type": "string",
                    "description": "与业务错误码对应的中文 ID、记录、状态、权限、维护状态或认证失败原因。"
                  },
                  "data": {
                    "type": "string",
                    "enum": [
                      ""
                    ],
                    "description": "业务错误时固定为空字符串。"
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "example": {
            "code": 0,
            "msg": "过滤器删除成功",
            "data": null
          }
        }
      }
    }
  },
  "x-python-handler": "site.CCFilterAPI",
  "x-python-route-line": 400,
  "x-audience": "user",
  "x-auth": "user",
  "x-reviewed": true,
  "parameters": [
    {
      "name": "filter_id",
      "in": "path",
      "required": true,
      "description": "要删除的 CC 过滤器 ID；删除多个过滤器时按 `10021,10022` 形式使用英文逗号连接，每一段都必须是十进制数字。",
      "schema": {
        "type": "string",
        "pattern": "^[0-9]+(?:,[0-9]+)*$"
      },
      "example": "10021,10022"
    }
  ],
  "x-itecdn-source-reviewed": true,
  "extensions": [
    {
      "key": "x-python-handler",
      "value": "site.CCFilterAPI"
    },
    {
      "key": "x-python-route-line",
      "value": 400
    },
    {
      "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/cc-filters/{filter_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": "删除一个或多个 CC 过滤器",
    "description": {
      "content": "删除路径中指定的一个或多个 CC 过滤器，多个 ID 使用英文逗号分隔并在同一个数据库事务中处理。普通用户只能删除归属于自己的自定义过滤器，管理员可以删除系统内置过滤器及其他用户的过滤器。每个目标必须已经禁用；如果仍有关联的同步或删除任务，该任务状态必须为 `done`。任一 ID 格式错误、记录不存在、越权、仍启用或任务未完成时，整个批次回滚，不会保留部分删除结果。",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "v1",
        "cc-filters",
        ":filter_id"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": [
        {
          "disabled": false,
          "description": {
            "content": "(Required) 要删除的 CC 过滤器 ID；删除多个过滤器时按 `10021,10022` 形式使用英文逗号连接，每一段都必须是十进制数字。",
            "type": "text/plain"
          },
          "type": "any",
          "value": "",
          "key": "filter_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"
        }
      ]
    }
  }
}