1

I have read the document of office 365 about onedrive. I have send two http requests:

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  

but I have received the same result,anyone could tell me whether office 365 onedrive supports paging?

Rarepuppers
  • 723
  • 1
  • 10
  • 21
zhaoxiong
  • 21
  • 4

1 Answers1

0

OneDrive's paging model is a little different to skip+take. Essentially you'll make a query like:

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

and in the response you should see the usual array of values, along with a property called @odata.nextLink. You'll want to take that URL use it request the next page:

"@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

You keep doing this until you don't get an @odata.nextLink returned.

Brad
  • 4,089
  • 2
  • 16
  • 26
  • Hey @Brad, there's a question here that looks like it needs your expertise: http://stackoverflow.com/questions/43608542/client-side-paging-using-microsoft-onedrive-api-sdk/43873195?noredirect=1#comment74848227_43873195 – Reuben Tanner May 11 '17 at 14:48