office365 – 使用Microsoft OneDrive API / SDK的客户端分页
我正在尝试使用Microsoft OneDrive API / SDK实现客户端分页.为此,我需要项目的总计数作为API的响应,并且基于传递给API的跳过和最大限制值,应该获取响应.
在List Items链接中,提到我们可以使用here提供的查询字符串来实现此目的.基于此假设,我正在构建API调用的URL,如下所示: string.Format("https://graph.microsoft.com/v1.0/me/drive/root/children?$skip={0}&$top={1}&$count=true",topValue*page,topValue) 根据上面提到的URL中的信息,一切似乎都很好,但我从服务器收到“错误请求”,并显示错误消息,如下所示: { "error": { "code": "","message": "The query specified in the URI is not valid. Query option 'Skip' is not allowed. To allow it,set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings.","innerError": { "request-id": "384693d7-65bd-4dc6-8d60-afde68e01555","date": "2017-04-25T10:28:15" } } } { "error": { "code": "","message": "The query specified in the URI is not valid. Query option 'Count' is not allowed. To allow it,"innerError": { "request-id": "2188a06f-10cf-402c-9c49-bd296b9db614","date": "2017-04-25T10:29:05" } } } 这可以使用REST API或Microsoft Graph SDK实现吗? PS:我看到了skipToken的概念,但是它不符合我们的要求,因为它不返回总计数,只支持增量导航. 解决方法
看来OneDrive工程师已经回答了这个问题
here:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows – 监控硬盘健康状况的最佳策略是什么?
- windows-mobile – 通过ActiveSync连接时,从windows mobile
- vbscript – 如何在64位Windows中检索启动文件夹位置
- windows-server-2008-r2 – IIS抱怨端口正在被使用
- 在没有uint8_t数据类型的MCU上使用uint8_t进行结构化
- windows – 是否可以确定哪个键盘发送了按键?
- 安装系统,用cmd进行分区
- windows-server-2008-r2 – 如何在Windows Server 2008 R2上
- 如何在Windows上启动具有某些启动参数的服务
- 如何为Windows上的带宽使用提供正在运行的进程优先级?