简体   繁体   English

在Office 365 REST API中搜索具有类别的邮件

[英]Searching for messages with categories in Office 365 REST API

I'm trying to find all messages that have a non-empty category list, using Office 365 REST API, using the following request: 我正在尝试通过以下请求使用Office 365 REST API查找所有具有非空类别列表的邮件:

/api/v2.0/me/messages?$search=%22Categories:-[]%22

This doesn't seem to work though: it returns an empty result set. 但这似乎不起作用:它返回一个空结果集。 When I run the same query in Outlook 2016 UI, it does return results. 当我在Outlook 2016 UI中运行相同的查询时,它会返回结果。 Is it not supported or is their something wrong with the query? 是不支持查询还是他们的查询有问题?

As my test, using the following format can get the non-empty category list. 作为我的测试,使用以下格式可以获取非空类别列表。 endpointUri + "/Me/Messages?$search=%22category:%22". endpointUri +“ / Me / Messages?$ search =%22category:%22”。 The search field is 'category', and add nothing behind the colon. 搜索字段为“类别”,并且在冒号后面不添加任何内容。 Hope it helps. 希望能帮助到你。

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

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