使用Microsoft Graph API获取驱动器的所有SharePoint文件和文件夹 [英] Get all SharePoint files and folders of a drive using Microsoft Graph API

查看:259
本文介绍了使用Microsoft Graph API获取驱动器的所有SharePoint文件和文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是:如果我呼叫https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children,我得到的只是该驱动器的顶级项目.

My problem is: if I call https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children all I get are the top-level items of that drive.

如何获得驱动器的所有所有子文件夹和文件?

How can I achieve to get all the subfolders and files of the drive?

推荐答案

没有端点可以一次从每个子文件夹中获取每个文件中每个文件的驱动器中的所有项目.

以下端点映射到测试库MyDoc3.

Below endpoint maps to a test library MyDoc3.

/sites/siteid/drives/{drive-id}

然后,在端点下方使用该命令在MyDoc3中获取FolderA的子级.

Then, below endpoint use to get children of FolderA in MyDoc3.

/sites/siteid/drives/{drive-id}/root:/FolderA:/children

这篇关于使用Microsoft Graph API获取驱动器的所有SharePoint文件和文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆