GET /admin/storage/trash

与用户面 /storage/trash 同体、同租户范围;供控制台在 admin 平面读取。

存储服务 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
page query integer 否 页码(默认1)
page_size query integer 否 每页条数(默认20)

响应

状态描述Schema
200回收站文件列表及分页信息handler_dto.FileListResponse
400参数验证失败dto.Problem
401未认证或令牌已过期dto.Problem
403权限不足dto.Problem
500服务器内部错误dto.Problem

引用的 Schema

dto.FieldViolation

字段类型必填示例约束描述
code string 否 Code 是错误代码(可选) 用于程序识别错误类型,如 "required", "format", "range"
description string 否 Description 是人类可读的错误描述 应该说明违反了什么规则,如 "必须是一个有效的邮箱地址"
field string 否 Field 是错误字段的路径 使用点号表示嵌套字段,如 "user.email" 或 "addresses[0].city"
standard string 否 Standard 是指向权威规范文档的 URI 引用 用于告知 API 消费者具体违反哪个标准 示例:"https://www.rfc-editor.org/info/rfc5322"
value object 否 Value 是导致错误的值(可选,开发模式下使用) 生产环境可能不返回此字段以避免泄露敏感信息

dto.Problem

字段类型必填示例约束描述
code integer 否 Code 是业务错误码 用于程序处理特定错误场景 示例:30101001
detail string 否 Detail 是针对此具体错误实例的人类可读解释 可以包含具体的错误细节,如"Field 'email' is required"
errors array of

参见 dto.FieldViolation

否 Errors 是字段级验证错误列表(扩展字段) 遵循 Web API 标准实践,每个错误包含字段名和错误信息
i18n_args object 否 I18nArgs 是国际化参数 用于动态填充翻译模板
i18n_key string 否 I18nKey 是国际化键 用于客户端本地化错误消息 示例:"error.user_not_found"
instance string 否 Instance 是发生问题的具体URI引用 通常是请求的URL,可能包含查询参数 示例:"/api/v1/users?limit=invalid"
request_id string 否 RequestID 是请求唯一标识 用于日志关联和问题追踪 示例:"req_550e8400-e29b-41d4-a716-446655440000"
retry_after integer 否 RetryAfter 用于 429 Too Many Requests 响应 指示客户端应在多少秒后重试请求(RFC 6585)
service string 否 Service 是服务名 用于微服务架构中定位错误来源 示例:"auth-service"
span_id string 否 SpanID 是当前 span 标识 用于精确定位分布式链路中的当前节点
status integer 否 Status 是产生的HTTP状态码 用于客户端区分问题类型,不随Accept-Language变化 示例:400, 401, 403, 404, 500
timestamp string 否 Timestamp 是错误发生时间 ISO 8601 格式 示例:"2026-04-03T12:00:00Z"
title string 否 Title 是简短、人类可读的问题类型摘要 相同的 Type 应该始终有相同的 Title(不随实例变化) 示例:"Invalid Request Parameters"
trace_id string 否 TraceID 是分布式追踪标识 遵循 W3C Trace Context 标准 示例:"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
type string 否 Type 是标识问题类型的URI引用 当该URI被解引用时,应提供人类可读的文档 示例:"https://api.example.com/errors/invalid-request"

service-core/base/dto.PageInfo

字段类型必填示例约束描述
has_next boolean 否 HasNext indicates whether there is a next page
has_prev boolean 否 HasPrev indicates whether there is a previous page
page integer 否 Page is the current page number (1-based)
page_size integer 否 PageSize is the number of items per page
total integer 否 Total is the total number of items across all pages
total_pages integer 否 TotalPages is the total number of pages

handler_dto.FileListResponse

字段类型必填示例约束描述
code integer 否
items array of

参见 handler_dto.FileMetadataResponse

否 统一使用 items
message string 否
pagination object 否 分页信息(嵌套对象)
timestamp string 否
total integer 否 总条数(平铺,便于直接读取)

handler_dto.FileMetadataResponse

文件元数据信息

字段类型必填示例约束描述
bucket string 否 avatars 存储桶
created_at string 否 2026-04-15T10:00:00Z 创建时间
etag string 否 "abc123def456" ETag
file_id string 否 file_abc123 文件ID
is_directory boolean 否 False 是否为文件夹
is_public boolean 否 False 可见性?
mime_type string 否 image/jpeg MIME类型
name string 否 avatar.jpg 文件名称
object_name string 否 2026/04/file_abc123.jpg 对象名称?
original_name string 否 avatar.jpg 原始名称
owner_id string 否 usr_abc123 所有ID
parent_id string 否 folder_001 父文件夹
size integer 否 102400 文件大小
storage_class string 否 standard 存储类别
tenant_id string 否 tnt_xyz789 租户ID
updated_at string 否 2026-04-15T10:30:00Z 更新时间