跳转到内容

分页查询云存储文件

Request

分页列出云存储文件。

  • 副作用:无。只读。可带退避安全重试。
  • 可见性只列出已确认上传完成的文件——拿了预签名 URL 但从未完成登记的文件不会出现。没有全量数据权限的成员只能看到自己上传的文件。
  • 筛选fileName 为模糊匹配;tagIds 为「命中任一即返回」;结果按创建时间倒序,顺序不可更改。
  • 注意:如果某个标签在仍挂在文件上时被删除,tagInfo 里会出现 null 元素。
Bodyapplication/jsonrequired
pageNointeger, >= 1

当前页码,从 1 开始,默认 1。

Default:1
Example:1
pageSizeinteger, >= 1

每页条数,默认 10。

Default:10
Example:20
fileNamestring

用于模糊搜索的文件名关键字。

Example:"report"
tagIdsArray of strings

按标签 ID 筛选。

Example:
[ "1800000000000101" ]
fileTypeinteger

文件类型筛选:0 = 图片,1 = 视频,2 = 应用,3 = 音频,4 = 文档,5 = 其他。

Example:0
fileIdsArray of strings

按文件 ID 筛选。

Example:
[ "1800000000001001" ]
POST
/api/cloudstorage/file/page
curl -i -X POST \
  http://127.0.0.1:40000/api/cloudstorage/file/page \
  -H 'Content-Type: application/json' \
  -d '{
    "pageNo": 1,
    "pageSize": 20,
    "fileName": "report",
    "tagIds": [
      "1800000000000001"
    ]
  }'

Responses

成功

Bodyapplication/json
codeintegerrequired

返回结果码。0 表示成功;其他值表示异常。

Example:0
msgstring or nullrequired

错误信息。

Example:null
requestIdstring

操作请求 ID。请求经过 API 网关时可能返回该字段。

Example:"1d4f3ea968664593860b94b35d4ebf5e"
dataobject(FilePageData)required
Response
{ "code": 0, "msg": null, "requestId": "1d4f3ea968664593860b94b35d4ebf5e", "data": { "current": "1", "pages": "7", "total": "128", "dataList": [] } }