文档API 参考

Rust · 0.1.0

Batch Delete Attachments

POST /api/v1/attachments:batchDelete

AttachmentService · AttachmentService_BatchDeleteAttachments

基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。

访问权限

需要附件所有者或实例管理员;关联附件还要求有权管理所属笔记,并满足归属检查。

删除元数据与存储内容

删除会移除存储资源,而非仅解除笔记关联。动态媒体组必须一起选中,部分选中会被拒绝。批量删除接收 1–100 个附件资源名。存储清理在数据库提交后进行,因此清理失败不代表附件元数据仍然存在。

成功响应

此操作没有资源对象需要返回。Rust REST 传输将 protobuf Empty 序列化为 HTTP 200 与 JSON {}。生成接口定义中的成功结构为空是有意行为,不表示遗漏了请求说明。

请求

BatchDeleteAttachments deletes multiple attachments in one request.

POST/api/v1/attachments:batchDelete

参数

未声明路径或查询参数。

请求体

必需

application/json · BatchDeleteAttachmentsRequest

响应

200 · OK

default · Default error response

application/json · Status

完整操作定义

下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。

展开 JSON 定义
{
  "tags": [
    "AttachmentService"
  ],
  "description": "BatchDeleteAttachments deletes multiple attachments in one request.",
  "operationId": "AttachmentService_BatchDeleteAttachments",
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BatchDeleteAttachmentsRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {}
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}