Sandy Atkinson Sandy Atkinson - 4 months ago 24
reST (reStructuredText) Question

How should the OneDrive children@odata.nextLink parameter be used

When I open a folder, and request its children, I get back a paging variable - children@odata.nextLink. If I call this (office 365 business) I just get the first 200 child items again. Is this broken or am I doing something wrong.

Answer

This appears to be a bug. I've opened an issue in the API issues list: https://github.com/OneDrive/onedrive-api-docs/issues/422.

In the mean time, you can work around this bug by targeting the folder's /children collection directly, instead of using ?expand=children.

For example:

GET /_api/v2.0/drive/root:/PathToFolderWithLotsOfFiles:/children

You can then page through the items in the folder as you would expect, using @odata.nextLink.