rest - Microsoft graph api - Outlook - 仅返回最新邮件
问题描述
Outlook https://graph.microsoft.com/v1.0/me/messages的 microsoft graph api不会返回邮箱中的所有邮件。以及如何在特定时间间隔之间获取邮件。
解决方案
您可以使用$filter
子句按日期和时间过滤电子邮件。
按日期
GET https://graph.microsoft.com/v1.0/me/messages?$filter=ReceivedDateTime ge 2021-05-07 and receivedDateTime lt 2021-05-10
按日期和时间
GET https://graph.microsoft.com/v1.0/me/messages?$filter=ReceivedDateTime ge 2021-05-07T08:00:00Z and receivedDateTime lt 2021-05-07T12:00:00Z
推荐阅读
- nlp - 如何处理神经机器翻译中的名字/未知词?
- matlab - 在不均匀列表上查找靠近的 Lon 值
- ruby-on-rails - Rails 操作可以重定向 *with* JSON 有效负载吗?
- assembly - ld 链接描述文件,标记部分 RW
- jenkins - 在工作期间在远程服务器上使用 Jenkins 环境变量
- php - 从 Laravel 返回的用于下载 Excel 文件的数据是无稽之谈,如何解决?
- javascript - Gulp:任务函数必须在 Gulp.set 中指定
- vue.js - 在Vue中删除当前选项时将选定值更改为null
- python - 为什么我使用 name.replace('N','n') 而不是 name.replace("N","n") 时收到错误
- python - 无法使用 Python beautifulsoup 从不需要的字符中清除字符串