Office 365 onedrive不支持分页 [英] office 365 onedrive does not support paging

查看:104
本文介绍了Office 365 onedrive不支持分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了有关onedrive的Office 365文档.我已经发送了两个http请求:

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  

但是我收到了相同的结果,有人可以告诉我Office 365 onedrive是否支持分页吗?

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

推荐答案

OneDrive的分页模型与skip + take有点不同.本质上,您将进行如下查询:

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

,并且在响应中,您应该看到通常的值数组以及一个名为@odata.nextLink的属性.您需要使用该URL来请求下一页:

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

您一直这样做,直到没有返回@odata.nextLink.

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

这篇关于Office 365 onedrive不支持分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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