簡體   English   中英

Odata v.4 $ filter用於Office 365 REST API中的DateTime日歷事件

[英]Odata v.4 $filter for the DateTime Calendar Events in the Office 365 REST API

我正在嘗試使用以下查詢從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

因此,我希望僅將BodyPreview作為所有大於2016-02-10 22:00:00的事件的返回值的結果為100。

我收到的錯誤消息是以下內容:

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”類型的查詢?

我看了一下這篇文章: Office 365 REST API中日期的Odata $ filter

但是我看不到我的查詢與帖子中的查詢之間的區別。

並且https://msdn.microsoft.com/zh-cn/office/office365/api/complex-types-for-mail-contacts-calendar上的所有示例都沒有在示例中提及這種類型的DateTimeTimeZone查詢。

我也嘗試過這種查詢格式:

datetime'2016-01-10T22:00:00'

也沒有運氣。 有任何想法嗎?

在beta和v2端點中 ,“ Start和“ End ”的類型已更改 現在它是一種復雜的類型,因此您需要稍微更改一下過濾器:

$filter=Start/DateTime ge 2016-02-10T22:00:00Z

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM