简体   繁体   English

Microsoft Graph API 在时间间隔内获取日历更改,按 lastModifiedDateTime 过滤

[英]Microsoft Graph API get calendar changes in a time interval, filter by lastModifiedDateTime

Im trying to get the modified or created events in the calendar, after a specific date.我试图在特定日期之后在日历中获取修改或创建的事件。

  1. Following documentation link , i can use this url to get the events of this year.按照文档链接,我可以使用这个 url 来获取今年的事件。

https://graph.microsoft.com/v1.0/me/calendarview?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00

  1. Since i want to get only the modified or created events after a specific date im trying to use filter and lastModifiedDateTime attibute, by this way由于我只想在特定日期之后获取修改或创建的事件,因此我尝试使用过滤器和 lastModifiedDateTime 属性,通过这种方式

https://graph.microsoft.com/v1.0/me/calendarview?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00&$filter=lastModifiedDateTime%20gt%202020-10-01T00:00:00z

trying to get the events which were modified this month, i get a empty response, not even errors.试图获取本月修改的事件,我得到一个空的响应,甚至没有错误。

  1. I also tried this way documentation link using我也尝试过这种方式文档链接使用

https://graph.microsoft.com/v1.0/me/calendarView/delta?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00&lastModifiedDateTime%20gt%202020-10-01T00:00:00z

but it returns all the events of the year and does not filter by lastModifiedDateTime.但它返回当年的所有事件并且不按 lastModifiedDateTime 过滤。

There are any proper way to get the modified or created calendar events after a specific date?有什么正确的方法可以在特定日期之后获取修改或创建的日历事件?

Looks like calendarView does not work properly with filter, a working alternative is filter list events, Documentation Link看起来 calendarView 不能与过滤器一起正常工作,一个可行的替代方法是过滤器列表事件, 文档链接

A working url looks like this : https://graph.microsoft.com/v1.0/me/calendar/events?$filter=lastModifiedDateTime%20gt%20" + date + "z"工作网址如下所示: https://graph.microsoft.com/v1.0/me/calendar/events?$filter=lastModifiedDateTime%20gt%20" + date + "z" : https://graph.microsoft.com/v1.0/me/calendar/events?$filter=lastModifiedDateTime%20gt%20" + date + "z" $filter https://graph.microsoft.com/v1.0/me/calendar/events?$filter=lastModifiedDateTime%20gt%20" + date + "z"

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

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