簡體   English   中英

Microsoft Graph API:按位置過濾日歷事件

[英]Microsoft Graph API: Filter Calendar Events by Location

我正在嘗試按位置 displayName 過濾所有事件。 由於 location 是一個復雜的屬性並且 displayName 是嵌套的,因此我需要有關如何執行此操作的幫助。 我嘗試了以下但都沒有工作。

https://graph.microsoft.com/v1.0/me/events?$expand=location($filter=displayName eq '東會議室')

https://graph.microsoft.com/v1.0/me/events?$filter=location/displayName/'東會議室'

您可以通過使用 api 中的 $filter 參數來實現您想要的。

使用查詢參數自定義響應

我通過改編文檔中的電子郵件示例來制定您的示例,該示例還通過嵌套參數過濾並與字符串進行比較。

獲取登錄用戶收到的來自特定地址的所有電子郵件。 https://graph.microsoft.com/v1.0/me/messages?$filter=from/emailAddress/address eq 'someuser@example.com'

因此,對於您的用例,即僅獲取位置 displayName 等於“East Conference Room”的日歷事件,它將是:

https://graph.microsoft.com/v1.0/me/events?$filter=location/displayName eq 'East Conference Room'

暫無
暫無

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

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