2016-03-01 39 views
0

我已閱讀關於onedrive的office 365文檔。我已經發送兩個HTTP請求:office 365 onedrive不支持分頁

1)https://graph.microsoft.com/v1.0/me/drive/root/children?$orderby=name&$top=5&$skip=0 
2)https://graph.microsoft.com/v1.0/me/drive/root/children?$orderby=name&$top=5&$skip=5 

,但我已經收到了同樣的結果,任何人都可以告訴我辦公室365 onedrive是否支持分頁?

回答

0

OneDrive的分頁模型與skip + take有點不同。從本質上講,你會做出這樣的查詢:

GET https://graph.microsoft.com/v1.0/me/drive/root/children?$top=5

,並在響應你應該看到的值通常陣列,一個叫@odata.nextLink財產一起。您將要採取的URL中使用它請求下一個頁面:

"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/drive/root/children?$skiptoken=ASDGASGSD"

GET https://graph.microsoft.com/v1.0/me/drive/root/children?$skiptoken=ASDGASGSD

你一直這樣做,直到你沒有得到一個@odata.nextLink返回。

+0

嘿@布拉德,這裏有一個問題,看起來像它需要你的專業知識:http://stackoverflow.com/questions/43608542/client-side-paging-using-microsoft-onedrive-api-sdk/43873195?noredirect = 1#comment74848227_43873195 –