在Office365 Outlook中创建发生的事件并修改任何单个事件(编辑事件)时,更改永远不会反映在REST API中使用的数据中。未创建重复异常(新事件)且系列主节点未更改单个字段。
预期的行为是SeriesMaster包含异常列表(例如按日期),并且每个异常都要创建为具有链接到递归头的新的单独事件(例如:SeriesMasterId)。
{
"@odata.id ": "https: //outlook.office365.com/api/v1.0/Users('----')",
"@odata.etag": "----",
"Id": "----",
"ChangeKey": "----",
"Categories": [],
"DateTimeCreated": "2015-05-27T13:36:11.9330924Z",
"DateTimeLastModified": "2015-05-27T13:44:16.2212804Z",
"Subject": "EVRY DAY INTERVAL WITH EXCEPTIONS",
"BodyPreview": "",
"Body": {
"ContentType": "HTML",
"Content": "Example content"
},
"Importance": "Normal",
"HasAttachments": false,
"Start": "2015-04-28T00:00:00Z",
"StartTimeZone": "UTC",
"End": "2015-04-29T00:00:00Z",
"EndTimeZone": "UTC",
"Reminder": null,
"Location": {
"DisplayName": "",
"Address": {
"Street": "",
"City": "",
"State": "",
"CountryOrRegion": "",
"PostalCode": ""
},
"Coordinates": {
"Accuracy": "NaN",
"Altitude": "NaN",
"AltitudeAccuracy": "NaN",
"Latitude": "NaN",
"Longitude": "NaN"
}
},
"ResponseStatus": {
"Response": "Organizer",
"Time": "0001-01-01T00:00:00Z"
},
"ShowAs": "Free",
"IsAllDay": true,
"IsCancelled": false,
"IsOrganizer": true,
"ResponseRequested": true,
"Type": "SeriesMaster",
"SeriesMasterId": null,
"Attendees": [],
"Recurrence": {
"Pattern": {
"Type": "Daily",
"Interval": 2,
"Month": 0,
"Index": "First",
"FirstDayOfWeek": "Sunday",
"DayOfMonth": 0
},
"Range": {
"Type": "NoEnd",
"StartDate": "2015-04-28T00:00:00+03:00",
"EndDate": "0001-01-01T00:00:00Z",
"NumberOfOccurrences": 0
}
},
"Organizer": {
"EmailAddress": {
"Address": "----",
"Name": "----"
}
},
"iCalUId": "----",
"WebLink": "----"
}
有人可以对此轻描淡写吗?目前,从Rest API中消耗的整个Recurrence对象看起来(为此道歉)不完整且无用(但我在每一步都遇到了障碍)。
还有什么地方可以直接向API的开发团队报告问题吗?
答案 0 :(得分:4)
例外和事件实际上并未在Recurrence
对象中公开。要查看单个出现或异常,您需要使用CalendarView端点。这会导致Exchange扩展指定时间窗口的重复事件,并返回单个出现或异常。这是必要的,因为日历上不存在各个出现/异常作为实际事件,它们是从系列主数据派生的。如果您只是在/Me/Events
上进行GET,那么您永远不会看到它们!
例如,我在我的日历上创建了一个定期事件,然后我将一个事件修改为在不同的时间(这使它成为例外)。
在/Me/Events
上执行GET:
{
"@odata.context": "https://outlook.office365.com/api/v1.0/$metadata#Me/Events",
"value": [
{
"@odata.id": "https://outlook.office365.com/api/v1.0/Users('jason@johnstonian.onmicrosoft.com')/Events('AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ-5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA=')",
"@odata.etag": "W/\"KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==\"",
"Id": "AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ-5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA=",
"ChangeKey": "KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==",
"Categories": [],
"DateTimeCreated": "2015-05-28T13:39:06.310974Z",
"DateTimeLastModified": "2015-05-28T13:39:21.0300106Z",
"Subject": "Exception test",
"BodyPreview": "",
"Body": {
"ContentType": "HTML",
"Content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\" style=\"display:none;\"><!-- P {margin-top:0;margin-bottom:0;} --></style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"divtagdefaultwrapper\" style=\"font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;\">\r\n<p><br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
},
"Importance": "Normal",
"HasAttachments": false,
"Start": "2015-05-28T20:00:00Z",
"StartTimeZone": "Eastern Standard Time",
"End": "2015-05-28T20:30:00Z",
"EndTimeZone": "Eastern Standard Time",
"Reminder": 15,
"Location": {
"DisplayName": "My Office",
"Address": {
"Street": "",
"City": "",
"State": "",
"CountryOrRegion": "",
"PostalCode": ""
},
"Coordinates": {
"Accuracy": "NaN",
"Altitude": "NaN",
"AltitudeAccuracy": "NaN",
"Latitude": "NaN",
"Longitude": "NaN"
}
},
"ResponseStatus": {
"Response": "Organizer",
"Time": "0001-01-01T00:00:00Z"
},
"ShowAs": "Busy",
"IsAllDay": false,
"IsCancelled": false,
"IsOrganizer": true,
"ResponseRequested": true,
"Type": "SeriesMaster",
"SeriesMasterId": null,
"Attendees": [],
"Recurrence": {
"Pattern": {
"Type": "Daily",
"Interval": 1,
"Month": 0,
"Index": "First",
"FirstDayOfWeek": "Sunday",
"DayOfMonth": 0
},
"Range": {
"Type": "EndDate",
"StartDate": "2015-05-28T00:00:00-04:00",
"EndDate": "2015-06-04T00:00:00-04:00",
"NumberOfOccurrences": 0
}
},
"Organizer": {
"EmailAddress": {
"Address": "jason@johnstonian.onmicrosoft.com",
"Name": "Jason Johnston"
}
},
"iCalUId": "040000008200E00074C5B7101A82E008000000006CACEEAA4B99D0010000000000000000100000009478C61D36C90847B5F3C126ACB0A17E",
"WebLink": "https://outlook.office365.com/owa/?ItemID=AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ%2F5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA%3D&exvsurl=1&viewmodel=ICalendarItemDetailsViewModelFactory"
}
]
}
在/Me/CalendarView
上对异常发生的那一天进行GET(请注意"Type": "Exception"
字段):
GET /Me/CalendarView?startDateTime=2015-05-30T04:00:00Z&endDateTime=2015-05-31T04:00:00Z
{
"@odata.id": "https://outlook.office365.com/api/v1.0/Users('jason@johnstonian.onmicrosoft.com')/Events('AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OAFRAAgI0miCtL1AAEYAAAAAaeDGf_cT90yZzQD5o7EbJQcAKDwUqsV0Dk_rbhNKcQjK7QAAAAABDQAAKDwUqsV0Dk_rbhNKcQjK7QAAucWAtQAAEA==')",
"@odata.etag": "W/\"KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==\"",
"Id": "AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OAFRAAgI0miCtL1AAEYAAAAAaeDGf_cT90yZzQD5o7EbJQcAKDwUqsV0Dk_rbhNKcQjK7QAAAAABDQAAKDwUqsV0Dk_rbhNKcQjK7QAAucWAtQAAEA==",
"ChangeKey": "KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==",
"Categories": [],
"DateTimeCreated": "2015-05-28T13:39:20.9676251Z",
"DateTimeLastModified": "2015-05-28T13:39:20.9676252Z",
"Subject": "Exception test",
"BodyPreview": "",
"Body": {
"ContentType": "HTML",
"Content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\" style=\"display:none;\"><!-- P {margin-top:0;margin-bottom:0;} --></style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"divtagdefaultwrapper\" style=\"font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;\">\r\n<p><br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
},
"Importance": "Normal",
"HasAttachments": false,
"Start": "2015-05-30T20:30:00Z",
"StartTimeZone": "Eastern Standard Time",
"End": "2015-05-30T21:00:00Z",
"EndTimeZone": "Eastern Standard Time",
"Reminder": 15,
"Location": {
"DisplayName": "My Office",
"Address": {
"Street": "",
"City": "",
"State": "",
"CountryOrRegion": "",
"PostalCode": ""
},
"Coordinates": {
"Accuracy": "NaN",
"Altitude": "NaN",
"AltitudeAccuracy": "NaN",
"Latitude": "NaN",
"Longitude": "NaN"
}
},
"ResponseStatus": {
"Response": "Organizer",
"Time": "0001-01-01T00:00:00Z"
},
"ShowAs": "Busy",
"IsAllDay": false,
"IsCancelled": false,
"IsOrganizer": true,
"ResponseRequested": true,
"Type": "Exception",
"SeriesMasterId": "AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ-5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA=",
"Attendees": [],
"Recurrence": null,
"Organizer": {
"EmailAddress": {
"Address": "jason@johnstonian.onmicrosoft.com",
"Name": "Jason Johnston"
}
},
"iCalUId": "040000008200E00074C5B7101A82E00807DF051E6CACEEAA4B99D0010000000000000000100000009478C61D36C90847B5F3C126ACB0A17E",
"WebLink": "https://outlook.office365.com/owa/?ItemID=AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OAFRAAgI0miCtL1AAEYAAAAAaeDGf%2BcT90yZzQD5o7EbJQcAKDwUqsV0Dk%2BrbhNKcQjK7QAAAAABDQAAKDwUqsV0Dk%2BrbhNKcQjK7QAAucWAtQAAEA%3D%3D&exvsurl=1&viewmodel=ICalendarItemDetailsViewModelFactory"
}
此外,这是一个直接向我们报告问题的绝佳论坛。只要您使用outlook-restapi
进行标记,我们就会看到它! :)