Microsoft Graph列出OneDrive项目的最大数量? [英] Microsoft Graph Maximum number for List OneDrive Items?

查看:122
本文介绍了Microsoft Graph列出OneDrive项目的最大数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图列出Onedrive文件夹中的所有项目. 在此文件夹中,完全有333个相同类型的文件.

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

通过Microsoft Graph进行的请求为此文件夹仅提供200个项目.

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

搜索文件(或文件扩展名)时返回的文件数量相同!恰好200.

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?

推荐答案

OneDrive API返回的默认页面大小为200个项目(提到).您应该在JSON对象上拥有一个名为@ odata.nextLink的属性,该属性是您的应用可用来请求下一页内容的URL(示例中剩余的133个项目).

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).

您还可以使用?top = 500个查询字符串参数,以将页面尺寸控制为更适合您的尺寸,或者通过将页面尺寸设置为较小的尺寸(例如20个项目)来测试此行为.

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).

这篇关于Microsoft Graph列出OneDrive项目的最大数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆