basePath: / definitions: file-system_internal_api_requests.CompleteMultipartRequest: properties: bucket_name: type: string object_key: type: string parts: items: $ref: '#/definitions/file-system_internal_common.Part' type: array upload_id: type: string type: object file-system_internal_api_requests.CreateBucketRequest: properties: bucket_name: type: string type: object file-system_internal_api_requests.DeleteBucketRequest: properties: bucket_name: type: string type: object file-system_internal_api_requests.DeleteFileRequest: properties: bucket_name: type: string object_key: type: string type: object file-system_internal_api_requests.InitMultipartRequest: properties: bucket_name: type: string object_key: type: string type: object file-system_internal_common.Part: properties: etag: type: string partNumber: format: int32 type: integer type: object file-system_internal_domain_repository.FileInfo: properties: etag: type: string key: type: string lastModified: type: string size: format: int64 type: integer type: object file-system_internal_domain_repository.ListFilesResult: properties: files: items: $ref: '#/definitions/file-system_internal_domain_repository.FileInfo' type: array nextContinuationToken: type: string type: object host: localhost:8080 info: contact: {} description: RustFS 文件存储系统 API,支持分片上传、文件预览、分页查询等高级功能。 title: RustFS File System API version: "1.1" paths: /buckets: delete: consumes: - application/json description: 删除指定的 S3 存储桶(桶必须为空) parameters: - description: 删除存储桶请求参数 in: body name: request required: true schema: $ref: '#/definitions/file-system_internal_api_requests.DeleteBucketRequest' produces: - application/json responses: "200": description: 删除成功消息 schema: additionalProperties: type: string type: object "400": description: 参数错误 schema: additionalProperties: type: string type: object "500": description: 服务器内部错误 schema: additionalProperties: type: string type: object summary: 删除存储桶 tags: - 存储桶管理 get: consumes: - application/json description: 列出所有可用的 S3 存储桶 produces: - application/json responses: "200": description: 存储桶列表 schema: additionalProperties: items: type: string type: array type: object "500": description: 服务器内部错误 schema: additionalProperties: type: string type: object summary: 获取存储桶列表 tags: - 存储桶管理 post: consumes: - application/json description: 创建一个新的 S3 存储桶 parameters: - description: 创建存储桶请求参数 in: body name: request required: true schema: $ref: '#/definitions/file-system_internal_api_requests.CreateBucketRequest' produces: - application/json responses: "200": description: 创建成功消息 schema: additionalProperties: type: string type: object "400": description: 参数错误 schema: additionalProperties: type: string type: object "500": description: 服务器内部错误 schema: additionalProperties: type: string type: object summary: 创建存储桶 tags: - 存储桶管理 /files/delete: delete: consumes: - application/json description: 从指定的存储桶删除文件 parameters: - description: 请求参数 in: body name: request required: true schema: $ref: '#/definitions/file-system_internal_api_requests.DeleteFileRequest' produces: - application/json responses: "200": description: 删除成功消息 schema: additionalProperties: type: string type: object "400": description: 参数错误 schema: additionalProperties: type: string type: object "500": description: 服务器内部错误 schema: additionalProperties: type: string type: object summary: 删除文件 tags: - 文件操作 /files/download: get: consumes: - application/json description: 从指定的存储桶下载文件 parameters: - description: 存储桶名称 in: query name: bucket_name required: true type: string - description: 对象键(文件名) in: query name: object_key required: true type: string produces: - application/octet-stream responses: "200": description: 文件流 schema: type: file "400": description: 参数错误 schema: additionalProperties: type: string type: object "500": description: 服务器内部错误 schema: additionalProperties: type: string type: object summary: 下载文件 tags: - 文件操作 /files/list: get: consumes: - application/json description: 分页查询存储桶中的文件 parameters: - description: 存储桶名称 in: query name: bucket_name required: true type: string - description: 文件名前缀筛选 in: query name: prefix type: string - description: 每页数量 in: query name: max_keys type: integer - description: 分页Token in: query name: token type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/file-system_internal_domain_repository.ListFilesResult' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 文件列表 (分页) tags: - 文件操作 /files/multipart/complete: post: consumes: - application/json description: 合并所有分片完成上传 parameters: - description: 请求参数 in: body name: request required: true schema: $ref: '#/definitions/file-system_internal_api_requests.CompleteMultipartRequest' produces: - application/json responses: "200": description: 返回文件位置 schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 完成分片上传 tags: - 大文件上传 /files/multipart/init: post: consumes: - application/json description: 开始一个新的大文件分片上传任务 parameters: - description: 请求参数 in: body name: request required: true schema: $ref: '#/definitions/file-system_internal_api_requests.InitMultipartRequest' produces: - application/json responses: "200": description: 返回 upload_id schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 初始化分片上传 tags: - 大文件上传 /files/multipart/part: put: consumes: - multipart/form-data description: 上传单个文件分片 parameters: - description: 存储桶名称 in: formData name: bucket_name required: true type: string - description: 对象键 in: formData name: object_key required: true type: string - description: 上传ID in: formData name: upload_id required: true type: string - description: 分片序号 (从1开始) in: formData name: part_number required: true type: integer - description: 分片文件数据 in: formData name: file required: true type: file produces: - application/json responses: "200": description: 返回 ETag schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 上传分片 tags: - 大文件上传 /files/preview: get: consumes: - application/json description: 生成文件的临时预览链接 (24小时有效) parameters: - description: 存储桶名称 in: query name: bucket_name required: true type: string - description: 对象键 in: query name: object_key required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 获取预览链接 tags: - 文件操作 /files/upload: post: consumes: - multipart/form-data description: 上传小文件到指定的存储桶 parameters: - description: 存储桶名称 in: formData name: bucket_name required: true type: string - description: 要上传的文件 in: formData name: file required: true type: file produces: - application/json responses: "200": description: 上传成功消息 schema: additionalProperties: type: string type: object "400": description: 参数错误 schema: additionalProperties: type: string type: object "500": description: 服务器内部错误 schema: additionalProperties: type: string type: object summary: 上传文件 (简单上传) tags: - 文件操作 swagger: "2.0"