Office365 使用office 365 API从特定日历获取事件
我正在尝试使用Office 365 API从特定日历(非默认)获取事件。我从office 365 API文档中找到了此URLOffice365 使用office 365 API从特定日历获取事件,office365,outlook-restapi,Office365,Outlook Restapi,我正在尝试使用Office 365 API从特定日历(非默认)获取事件。我从office 365 API文档中找到了此URL GET https://outlook.office.com/api/{version}/me/calendars/{calendar_id}/calendarview?startDateTime={start_datetime}&endDateTime={end_datetime} 其中,我将{calendar_id}替换为从另一个返回所有日历组的API调用中
GET https://outlook.office.com/api/{version}/me/calendars/{calendar_id}/calendarview?startDateTime={start_datetime}&endDateTime={end_datetime}
其中,我将{calendar_id}替换为从另一个返回所有日历组的API调用中获得的实际id
GET https://outlook.office.com/api/{version}/me/calendargroups
在替换所有相关参数后,我得到一个HTTP 500错误
但我可以使用获取默认日历的事件
GET https://outlook.office.com/api/{version}/me/calendarview?startDateTime={start_datetime}&endDateTime={end_datetime}
如何从特定(非默认)日历获取事件
感谢您的帮助。您的表格是正确的。但是,您说您是从
GET获取ID的https://outlook.office.com/api/{version}/me/calendargroups
,它不返回日历,而是返回日历组!所以你的身份很可能就是问题所在。试着做一个GEThttps://outlook.office.com/api/{version}/me/calendars
获取实际的日历文件夹,然后使用要查询的文件夹的ID。如何获取具有“recurence”表达式的日历的所有事件?
使用
它将返回多个事件,而不是一个带有表达式recurrence的事件。非常感谢。成功了。你是对的,我使用的日历组id是错误的。只是想知道,有没有一种方法可以在一次呼叫中从所有用户的日历(默认日历和其他日历)中获取事件。我找不到它,因此必须恢复到其他方式以获取第一个其他日历ID,然后获取此日历的事件。我们可以在请求范围内的事件时设置时区吗?
GET https://outlook.office.com/api/{version}/me/calendars/{calendar_id}/calendarview?startDateTime={start_datetime}&endDateTime={end_datetime}