简体   繁体   English

Microsoft Graph API 中的查询 reg 过滤器

[英]Query reg filter in Microsoft Graph API

I query emails from my Office 365 mailbox, which are received before a particular date using Microsoft Graph API.我从我的 Office 365 邮箱中查询电子邮件,这些电子邮件是使用 Microsoft Graph API 在特定日期之前收到的。

I use following quert : https://graph.microsoft.com/v1.0/users/*email*/mailfolders/Archive/messages?$filter=ReceivedDateTime lt 2020-04-01我使用以下查询: https ://graph.microsoft.com/v1.0/users/*email*/mailfolders/Archive/messages ? $filter = ReceivedDateTime lt 2020-04-01

I have manually checked the 'Archive' folder and there are many emails which are received before 2020-04-01.我已经手动检查了“存档”文件夹,并且在 2020 年 4 月 1 日之前收到了许多电子邮件。 Hence the query should provide output.因此查询应该提供输出。

My application will automatically run this query every 5 min.我的应用程序将每 5 分钟自动运行一次此查询。

While testing, I found that once the app started it run 12 times (1 hour) and gave correct output, however 13th call onwards, all subsequent calls are giving NULL JSON output.在测试时,我发现一旦应用程序启动,它就会运行 12 次(1 小时)并给出正确的输出,但是从第 13 次调用开始,所有后续调用都给出了 NULL JSON 输出。

I get following JSON response:我得到以下 JSON 响应:

<?xml version = "1.0" encoding = "UTF-8"?>
<ns0:RESTOutput xmlns:ns0 = "xxx">
<StatusCode>200</StatusCode>
<msg></msg>
</ns0:RESTOutput>

Please suggest.请建议。

I tested the Graph API call work in MS Graph Explorer and it works without any issue.我在 MS Graph Explorer 中测试了 Graph API 调用工作,它没有任何问题。

API call: API调用:

 https://graph.microsoft.com/v1.0/users/*email*/mailfolders/Archive/messages?$filter=ReceivedDateTime lt 2020-04-01

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM