Office 365 onedrive does not support swap

I read an office 365 doc about onedrive. I sent 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 got the same result, could anyone tell me if the office 365 supports onedrive paging?

0
source share
1 answer

The OneDrive swap model is slightly different from + take passes. Essentially, you will make a request like:

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

and in the answer you will see a regular array of values ​​along with the property @odata.nextLink. You will want to use this URL to request the following 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 get a refund @odata.nextLink.

0
source

Source: https://habr.com/ru/post/1016755/


All Articles