2017-08-10 78 views
0

我一直在尝试使用Microsoft Graph API V1.0和Beta遍历Sharepoint文档库下的文档库和文件夹下的项目。如何通过Microsoft Graph API迭代Sharepoint网站的文档库项目?

我可以列出的文档的lib使用以下请求:

https://graph.microsoft.com/v1.0/sites/mysite.sharepoint.com:/FOA/BD:/drives 

但在上面的路径特定的驱动器下我无法通过项目迭代。

经过长期的研究后,我试着用测试所有列出的驱动下,所有项目仍然没有结果的方式:

https://graph.microsoft.com/beta/sites/mysite.sharepoint.com:/foa/bd:/lists/Budget/ 

我跟着Get an item in a list,但仍然没有成功。

+0

Ravi,要枚举驱动器中的孩子,您需要访问驱动器的子集合...例如: '''https://graph.microsoft.com/v1.0/sites/ mysite.sharepoint.com:/FOA/BD:/drives/ {drive-id}/root/children'''这就是你在做什么?尝试此操作时是否出现错误? –

+0

会检查并通知您。 –

+0

我尝试使用建议的URL如下:(不成功只有错误) https://graph.microsoft.com/v1.0/sites/mydoamin.sharepoint.com:/ FOA/BD:/ drives/b!VCvM ../root/childre n https://graph.microsoft.com/v1.0/sites/mydoamin.sharepoint.com:/ FOA/BD:/ drives/budget/root/childre n –

回答

0

你就近了。使用获取驱动器列表的第一个链接,复制要检索文档的驱动器的驱动器标识。然后,你可以使用下面的端点:

https://graph.microsoft.com/v1.0/drives/{drive-id}/root/children 

我回答了similar question有更详细的使用越来越图表V1.0儿童项目。

相关问题