-->

Microsoft Graph Maximum number for List OneDrive I

2019-08-26 01:39发布

问题:

i tried to list all items within a Onedrive folder. In this folder there are exactly 333 files of same type.

The request via Microsoft Graph delivers only 200 items for this folder.

Same number of files i got back when i did a search for files (or file extension)! Exactly 200.

Is there a limit for the items/children? Is it possible to retrieve all items/children within a folder?

回答1:

The OneDrive API returns a default page size of 200 items (mentioned here on the List Children page). You should have a property on the JSON object named @odata.nextLink, which is a URL your app can use to request the next page of content (the remaining 133 items in your example).

You can also use the ?top=500 query string parameter to control the page size to something that works better for you, or to be able to test this behavior by setting the page size to something smaller (like 20 items).