Skip to main content
Files

列出 File

Forward Files API 接口说明。

描述

获取当前账户可见的 File 列表,支持分页和条件过滤。

路径

GET /api/v1/forward/files

请求头

头部必选说明
AuthorizationBearer <PAT 或 SAT>

查询参数

参数类型必选说明
limitinteger分页大小,最大 100。
pagestring分页游标(推荐使用),取值来自上一页响应的 next_page;与 after_idbefore_id 互斥。
after_idstring向后翻页游标;与 pagebefore_id 互斥。
before_idstring向前翻页游标;与 pageafter_id 互斥。
namestring按文件名搜索。
scope_idstring按资源作用域 ID 过滤,常用于 Session 资源文件查询。传入时不要同时使用 before_idafter_id;当前游标参数在该过滤模式下不生效。

示例请求

curl -X GET "https://api.qoder.com/api/v1/forward/files" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

{
  "data": [
    {
      "id": "file_xxx",
      "type": "file",
      "filename": "report.pdf",
      "size_bytes": 1024,
      "mime_type": "application/pdf",
      "created_at": "2026-07-23T10:00:00Z",
      "updated_at": "2026-07-23T10:00:00Z",
      "downloadable": true,
      "scope": null,
      "metadata": {
        "source": "console"
      },
      "identity_id": null
    }
  ],
  "first_id": "file_xxx",
  "last_id": "file_xxx",
  "has_more": false,
  "next_page": null
}

空列表响应

{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false,
  "next_page": null
}

响应字段

响应 data 数组每一项为 File 对象。分页字段详见 列表分页字段

错误码

HTTPtype触发条件
400invalid_request_error请求体、路径参数或查询参数非法。
401authentication_error缺少或无效的认证令牌。
403permission_error当前调用方无权访问该资源。
500/502/503api_errorForward 或依赖服务失败。