获取文件夹下的清单
GET
https://open.feishu.cn/open-apis/drive/v1/files
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
500 | 1061001 | internal error. | 服务内部错误,包括超时,错误码没处理。 |
400 | 1061002 | params error. | 请检查请求参数是否正确。 |
404 | 1061003 | not found. | 请确认对应资源是否存在。 |
403 | 1061004 | forbidden. | 请确认当前身份是否有对应上传节点的的权限,如用户是否有上传到指定doc的编辑权限。 |
401 | 1061005 | auth failed. | 请使用正确身份访问该接口。 |
404 | 1061007 | file has been delete. | 请确认对应节点未被删除。 |
400 | 1064001 | page size out of limit. | 请检查分页大小是否超过限制。 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://open.feishu.cn/open-apis/drive/v1/files' \
--header 'Authorization;'
响应示例响应示例
{
"code": 0,
"data": {
"files": [
{
"name": "test pdf.pdf",
"parent_token": "fldbcO1UuPz8VwnpPx5a9abcef",
"token": "boxbc0dGSMu23m7QkC1bvabcef",
"type": "file",
"url": "https://bytedance.feishu.cn/file/boxbc0dGSMu23m7QkC1bvabcef"
},
{
"name": "test file.docx",
"parent_token": "fldcnCEG903UUB4fUqfysdabcef",
"shortcut_info": {
"target_token": "boxcnRPaXpD4I6Je9t8k8babcef",
"target_type": "file"
},
"token": "nodcnVkiLQ6LD4CsUEaANrabcef",
"type": "shortcut",
"url": "https://bytedance.feishu.cn/file/boxcnRPaXpD4I6Je9t8k8babcef"
},
{
"name": "test docx",
"parent_token": "fldcnCEG903UUB4fUqfysdabcef",
"token": "doxcntan34DX4QoKJu7jJyabcef",
"type": "docx",
"url": "https://bytedance.feishu.cn/docx/doxcntan34DX4QoKJu7jJyabcef"
},
{
"name": "test sheet",
"parent_token": "fldcnCEG903UUB4fUqfysdabcef",
"token": "shtcnOko1Ad0HU48HH8KHuabcef",
"type": "sheet",
"url": "https://bytedance.feishu.cn/sheets/shtcnOko1Ad0HU48HH8KHuabcef"
}
],
"has_more": false
},
"msg": "success"
}
请求参数
Query 参数
page_size
string
可选
page_token
string
可选
folder_token
string
可选
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
返回响应
修改于 2023-01-13 04:05:11