2017-08-10 46 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兒童項目。

相關問題