Forward Files API 接口说明。
描述
获取当前账户可见的 File 列表,支持分页和条件过滤。
路径
GET /api/v1/forward/files
请求头
| 头部 | 必选 | 说明 |
|---|---|---|
Authorization | 是 | Bearer <PAT 或 SAT> |
查询参数
| 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
limit | integer | 否 | 分页大小,最大 100。 |
page | string | 否 | 分页游标(推荐使用),取值来自上一页响应的 next_page;与 after_id、before_id 互斥。 |
after_id | string | 否 | 向后翻页游标;与 page、before_id 互斥。 |
before_id | string | 否 | 向前翻页游标;与 page、after_id 互斥。 |
name | string | 否 | 按文件名搜索。 |
scope_id | string | 否 | 按资源作用域 ID 过滤,常用于 Session 资源文件查询。传入时不要同时使用 before_id 或 after_id;当前游标参数在该过滤模式下不生效。 |
示例请求
示例响应
空列表响应
响应字段
响应 data 数组每一项为 File 对象。分页字段详见 列表分页字段。
错误码
| HTTP | type | 触发条件 |
|---|---|---|
| 400 | invalid_request_error | 请求体、路径参数或查询参数非法。 |
| 401 | authentication_error | 缺少或无效的认证令牌。 |
| 403 | permission_error | 当前调用方无权访问该资源。 |
| 500/502/503 | api_error | Forward 或依赖服务失败。 |