Office 365 Graph API $top 未在增量查询中得到认可 [英] Office 365 Graph API $top not being honoured on delta queries

查看:21
本文介绍了Office 365 Graph API $top 未在增量查询中得到认可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Office 365 Graph API 文档建议在增量查询中同时使用 $filter 和 $top 操作...

The Office 365 Graph API documentation suggests that $filter and $top operations should be supported when used together on a delta query...

https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_messages#track-message-changes-in-a-folder

但是,当执行同时使用 $filter 和 $top 的查询时,例如:

However, when executing a query that uses both $filter and $top such as this:

https://graph.microsoft./mailfolders/AAMkADQ3MDg1NWRmLTUxMGQtNDRiMi1iMGE4LTAzMzdjNGRiYTIxNQAuAAAAAADEPuholyn_QpUTcq2qMEH4AQBScDrPb_rMTZOocc5vRCTLAAAAAAEMAAA=/messages/delta?$filter=receivedDateTime%20ge%202017-04-01T

https://graph.microsoft.com/beta/me/mailfolders/AAMkADQ3MDg1NWRmLTUxMGQtNDRiMi1iMGE4LTAzMzdjNGRiYTIxNQAuAAAAAADEPuholyn_QpUTcq2qMEH4AQBScDrPb_rMTZOocc5vRCTLAAAAAAEMAAA=/messages/delta?$filter=receivedDateTime%20ge%202017-04-01T00:00:00Z&$top=1000

我们发现没有应用 $top 值,而是使用了每页 10 个结果的默认值.但是 $filter 已正确应用.

We find that the $top value is not applied and the default value of 10 results per page is used. However the $filter has been applied correctly.

在没有 $filter 语句的情况下进行测试时,我们发现 $top 值按预期应用.

When testing without the $filter statement, we find the $top value is applied as expected.

这是 Graph API 中的错误还是我误解了什么?提前致谢.

Is this a bug in the Graph API or am I misunderstanding something? Thanks in advance.

推荐答案

我无法使用带有 delta 的 $top 参数获得输出.

I could not get output using $top parameter with delta.

但同一文档中提到的可选 odata.maxpagesize 标头似乎正在工作.

But the optional odata.maxpagesize header mentioned in the same doc seems to be working.

您可以尝试将其添加到您的请求标头中.喜欢:

You can try adding this to your request headers. Prefer:

odata.maxpagesize=1000

这篇关于Office 365 Graph API $top 未在增量查询中得到认可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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