Skip to content

文件夹概述

本文档介绍云空间中文件夹相关能力的基础概念、文件夹 token 的获取方式和文件夹的 API 列表。

基础概念

文件夹是飞书云空间中用于管理文件和其它文件夹的容器。每个文件夹都有唯一的 token 作为标识。在不同接口中,其参数命名可能不同,包括 tokenfolder_tokenfolderToken 等。

文件夹 token 获取方式

你可通过以下两种方式获取文件夹的 token:

方法列表

以下为文件夹的方法列表。其中,“商店”代表应用商店应用;“自建”代表企业自建应用,了解更多应用相关信息,参考应用类型简介。了解调用服务端 API 的流程,参考流程概述

方法 (API)权限要求(满足任一)访问凭证商店自建
[获取我的空间(root folder)元数据](https://open.larkoffice.com/document/ukTMukTMukTM/ugTNzUjL4UzM14CO1MTN/get-root-folder-meta)GET /open-apis/drive/explorer/v2/root_folder/metadrive:drive 查看、评论、编辑和管理云空间中所有文件 drive:drive.metadata:readonly 查看云空间中文件元数据tenant_access_token user_access_token
[获取文件夹中的文件清单](https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)GET /open-apis/drive/v1/filesdrive:drive 查看、评论、编辑和管理云空间中所有文件 drive:drive:readonly 查看、评论和下载云空间中所有文件 space:document:retrieve 获取云空间文件夹下的云文档清单tenant_access_token user_access_token
[获取文件夹元数据](https://open.larkoffice.com/document/ukTMukTMukTM/uAjNzUjLwYzM14CM2MTN)GET /open-apis/drive/explorer/v2/folder/:folderToken/metadrive:drive 查看、评论、编辑和管理云空间中所有文件 drive:drive.metadata:readonly 查看云空间中文件元数据tenant_access_token user_access_token
[新建文件夹](https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_folder)POST /open-apis/drive/v1/files/create_folderdrive:drive 查看、评论、编辑和管理云空间中所有文件 space:folder:create 创建云空间文件夹tenant_access_token user_access_token
[移动文件或文件夹](https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/move)POST /open-apis/drive/v1/files/:file_token/movedrive:drive 查看、评论、编辑和管理云空间中所有文件 space:document:move 移动云空间文件夹和云文档tenant_access_token user_access_token
[删除文件或文件夹](https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete)DELETE /open-apis/drive/v1/files/:file_tokendrive:drive 查看、评论、编辑和管理云空间中所有文件 space:document:delete 删除云空间文件夹和云文档tenant_access_token user_access_token
[查询异步任务状态](https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check)GET /open-apis/drive/v1/files/task_checkdrive:drive 查看、评论、编辑和管理云空间中所有文件 drive:drive.metadata:readonly 查看云空间中文件元数据 drive:drive:readonly 查看、评论和下载云空间中所有文件tenant_access_token user_access_token

内容来源:飞书开放平台 · 自动爬取整理