简体   繁体   English

获取文件夹和子文件夹ID Google云端硬盘

[英]Get folder and subfolder id Google Drive

I want to retrieve all ids from the folders and the subfolders from my Google Drive Account. 我想从我的Google云端硬盘帐户中检索文件夹中的所有ID和子文件夹。 I am using the work with folders from Google Drive Rest API. 我正在使用Google Drive Rest API中的文件夹

That's easy. 这很容易。 Use Files.list and in the " search " field, place mimeType = 'application/vnd.google-apps.folder as the parameter to indicate that you're only looking for files of type folder. 使用Files.list,然后在“ search ”字段中,将mimeType = 'application/vnd.google-apps.folder用作参数,以表明您仅在查找文件夹类型的文件。 Execute that and it will return all your folder. 执行该操作,它将返回您的所有文件夹。 Indicate in the fields that you're looking for "id". 在您要查找“ id”的字段中指明。 You'll have the complete list of your folder IDs. 您将拥有文件夹ID的完整列表。

Run this API Explorer URL to see for yourself. 运行此API Explorer URL亲自查看。 I've already placed the necessary fields for you. 我已经为您放置了必填字段。 Just Execute and Authorize. 只需执行并授权。 Just look for the id property, that's it. 只需查找id属性即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM