我想知道以下两个查询是否实际相同或者应该是相同的:
GET https://graph.microsoft.com/beta/sharepoint/sites/{spsite-id},{spweb-id}/drives
和
GET https://graph.microsoft.com/beta/sharepoint/sites:/MYPATH:/drives
我想通过相对路径访问sharepoint站点中的文档库项目。
答案 0 :(得分:0)
请注意,根据当前的测试版microsoft graph documentation,以下两个端点对于获取网站中的所有文档库或驱动器都是相同的。当你不知道网站ID但相关网站网址时,后者会变得很方便。
https://graph.microsoft.com/beta/sites/[domain.sharepoint.com]:/[relative-url]:/drives
https://graph.microsoft.com/beta/sites/[site-id]/drives
(例如,网站编号:" cie493742.sharepoint.com,4af352a7-a53b-43d9-b0a3-da372b392ea0,52c490f3-3354-40b9-a3c9-fefb08cb5c88")
现在获取文档库项目
从驱动器列表中获取文档库ID
从项目列表中获取项目ID
https://graph.microsoft.com/beta/sites/[site-id]/drives/[drive-id]/items
最终API调用
https://graph.microsoft.com/beta/sites/[site-id]/drives/[drive-id]/items/[item-id]
您可以尝试从here
试验图谱API