【发布时间】:2016-02-08 18:52:39
【问题描述】:
我正在尝试使用以下查询从 Office 365 REST API 获取和过滤日历事件:
https://outlook.office.com/api/v2.0/users/user@user.com/calendars/AAAAAAAAAAA/events?$top=100&$select=BodyPreview&$filter=Start ge 2016-02-10T22:00:00Z
所以我想要 100 个结果,只有 BodyPreview 作为大于 2016-02-10 22:00:00 的所有事件的返回值。
我收到的错误信息是这样的:
ERROR request returned 400
error:
code: 'RequestBroker-ParseUri',
message: 'A binary operator with incompatible types was detected. Found operand types \'Microsoft.OutlookServices.DateTimeTimeZone\' and \'Edm.DateTimeOffset\' for operator kind \'GreaterThanOrEqual\'.'
没有过滤选项的查询完美无缺。那么如何让我的查询代表“Microsoft.OutlookServices.DateTimeTimeZone”类型?
我看过这篇文章: Odata $filter for the date in the Office 365 REST API
但我看不出我的查询与帖子中的查询有什么区别。
https://msdn.microsoft.com/en-us/office/office365/api/complex-types-for-mail-contacts-calendar 上的所有示例均未在示例中提及此类 DateTimeTimeZone 查询。
我也试过这种查询格式:
datetime'2016-01-10T22:00:00'
也没有运气。 有什么想法吗?
【问题讨论】:
标签: rest odata uri ms-office office365