office365 - How to know which occurrence of recurring event has been removed? -


my app has subscription office365 calendar called conferenceroom. when event created/modified/deleted office365 servers send notification application of 3 happened.

in calendar create recurring event standup meeting every monday (via browser). after app gets notification changetype: created , here recurring part of notification's event:

recurrence:  { pattern:     { type: 'weekly',       interval: 1,       month: 0,       dayofmonth: 0,       daysofweek: [object],       firstdayofweek: 'sunday',       index: 'first' },    range:     { type: 'noend',       startdate: '2016-09-12',       enddate: '0001-01-01',       recurrencetimezone: 'fle standard time',       numberofoccurrences: 0 } }, 

and whole data of event (id got notification):

{ '@odata.context': 'https://outlook.office.com/api/v2.0/$metadata#users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46%40ea38f869-d755-40c7-9c95-e6277325b7ae\')/events/$entity',   '@odata.id': 'https://outlook.office.com/api/v2.0/users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46@ea38f869-d755-40c7-9c95-e6277325b7ae\')/events(\'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaafzaabi3yqq_sjmsydhhux_auxfaaamnrbuaaa=\')',   '@odata.etag': 'w/"yt2kqvrizemhrx7sfmlfxqaadddf3g=="',   id: 'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaafzaabi3yqq_sjmsydhhux_auxfaaamnrbuaaa=',   createddatetime: '2016-09-13t03:55:43.5305953-02:00',   lastmodifieddatetime: '2016-09-13t03:55:43.5476101-02:00',   changekey: 'yt2kqvrizemhrx7sfmlfxqaadddf3g==',   categories: [],   originalstarttimezone: 'fle standard time',   originalendtimezone: 'fle standard time',   responsestatus: { response: 'organizer', time: '0001-01-01t00:00:00z' },   icaluid: '040000008200e00074c5b7101a82e00800000000f9b6fc76830dd2010000000000000000100000005d7d5b0b8d1ea84e86c8aee4014697ca',   reminderminutesbeforestart: 15,   isreminderon: true,   hasattachments: false,   subject: 'standup meeting',   body:    { contenttype: 'html',      content: '<html>\r\n<head>\r\n<meta http-equiv="content-type" content="text/html; charset=utf-8">\r\n<meta content="text/html; charset=us-ascii">\r\n<style type="text/css" style="display:none">\r\n<!--\r\np\r\n\t{margin-top:0;\r\n\tmargin-bottom:0}\r\n-->\r\n</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' },   bodypreview: '',   importance: 'normal',   sensitivity: 'normal',   start:    { datetime: '2016-09-12t03:00:00.0000000',      timezone: 'etc/gmt+2' },   end:    { datetime: '2016-09-12t03:30:00.0000000',      timezone: 'etc/gmt+2' },   location: { displayname: '', address: {}, coordinates: {} },   isallday: false,   iscancelled: false,   isorganizer: true,   recurrence:    { pattern:       { type: 'weekly',         interval: 1,         month: 0,         dayofmonth: 0,         daysofweek: [ 'monday' ],         firstdayofweek: 'sunday',         index: 'first' },      range:       { type: 'noend',         startdate: '2016-09-12',         enddate: '0001-01-01',         recurrencetimezone: 'fle standard time',         numberofoccurrences: 0 } },   responserequested: false,   seriesmasterid: null,   showas: 'busy',   type: 'seriesmaster',   attendees: [],   organizer:    { emailaddress:       { name: 'john smith',         address: 'john.smith@sample.onmicrosoft.com' } },   weblink: 'https://outlook.office365.com/owa/?itemid=aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt%2fm8jov8ti5b1bhmg2n%2bbwbi3yqq%2bsjmsydhhux%2bauxfaaaaaafzaabi3yqq%2bsjmsydhhux%2bauxfaaamnrbuaaa%3d&exvsurl=1&viewmodel=icalendaritemdetailsviewmodelfactory',   'calendar@odata.associationlink': 'https://outlook.office.com/api/v2.0/users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46@ea38f869-d755-40c7-9c95-e6277325b7ae\')/calendars(\'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaaegaabi3yqq_sjmsydhhux_auxfaaaaaa0jaaa=\')/$ref',   'calendar@odata.navigationlink': 'https://outlook.office.com/api/v2.0/users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46@ea38f869-d755-40c7-9c95-e6277325b7ae\')/calendars(\'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaaegaabi3yqq_sjmsydhhux_auxfaaaaaa0jaaa=\')' } 

this quite okay. problem comes when remove 1 occurrence of event in calendar. app gets notification changetype: updated , body of notification pretty same when event created. there no information on date event cancelled.

data of event when eventid got changetype: updated notification:

{ '@odata.context': 'https://outlook.office.com/api/v2.0/$metadata#users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46%40ea38f869-d755-40c7-9c95-e6277325b7ae\')/events/$entity',   '@odata.id': 'https://outlook.office.com/api/v2.0/users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46@ea38f869-d755-40c7-9c95-e6277325b7ae\')/events(\'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaafzaabi3yqq_sjmsydhhux_auxfaaamnrbuaaa=\')',   '@odata.etag': 'w/"yt2kqvrizemhrx7sfmlfxqaadddf3w=="',   id: 'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaafzaabi3yqq_sjmsydhhux_auxfaaamnrbuaaa=',   createddatetime: '2016-09-13t03:55:43.5305953-02:00',   lastmodifieddatetime: '2016-09-13t03:57:48.2229052-02:00',   changekey: 'yt2kqvrizemhrx7sfmlfxqaadddf3w==',   categories: [],   originalstarttimezone: 'fle standard time',   originalendtimezone: 'fle standard time',   responsestatus: { response: 'organizer', time: '0001-01-01t00:00:00z' },   icaluid: '040000008200e00074c5b7101a82e00800000000f9b6fc76830dd2010000000000000000100000005d7d5b0b8d1ea84e86c8aee4014697ca',   reminderminutesbeforestart: 15,   isreminderon: true,   hasattachments: false,   subject: 'standup meeting',   body:    { contenttype: 'html',      content: '<html>\r\n<head>\r\n<meta http-equiv="content-type" content="text/html; charset=utf-8">\r\n<meta content="text/html; charset=us-ascii">\r\n<style type="text/css" style="display:none">\r\n<!--\r\np\r\n\t{margin-top:0;\r\n\tmargin-bottom:0}\r\n-->\r\n</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' },   bodypreview: '',   importance: 'normal',   sensitivity: 'normal',   start:    { datetime: '2016-09-12t03:00:00.0000000',      timezone: 'etc/gmt+2' },   end:    { datetime: '2016-09-12t03:30:00.0000000',      timezone: 'etc/gmt+2' },   location: { displayname: '', address: {}, coordinates: {} },   isallday: false,   iscancelled: false,   isorganizer: true,   recurrence:    { pattern:       { type: 'weekly',         interval: 1,         month: 0,         dayofmonth: 0,         daysofweek: [ 'monday' ],         firstdayofweek: 'sunday',         index: 'first' },      range:       { type: 'noend',         startdate: '2016-09-12',         enddate: '0001-01-01',         recurrencetimezone: 'fle standard time',         numberofoccurrences: 0 } },   responserequested: false,   seriesmasterid: null,   showas: 'busy',   type: 'seriesmaster',   attendees: [],   organizer:    { emailaddress:       { name: 'john smith',         address: 'john.smith@sample.onmicrosoft.com' } },   weblink: 'https://outlook.office365.com/owa/?itemid=aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt%2fm8jov8ti5b1bhmg2n%2bbwbi3yqq%2bsjmsydhhux%2bauxfaaaaaafzaabi3yqq%2bsjmsydhhux%2bauxfaaamnrbuaaa%3d&exvsurl=1&viewmodel=icalendaritemdetailsviewmodelfactory',   'calendar@odata.associationlink': 'https://outlook.office.com/api/v2.0/users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46@ea38f869-d755-40c7-9c95-e6277325b7ae\')/calendars(\'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaaegaabi3yqq_sjmsydhhux_auxfaaaaaa0jaaa=\')/$ref',   'calendar@odata.navigationlink': 'https://outlook.office.com/api/v2.0/users(\'2ce6a929-0b04-40fb-9c73-d812370e0d46@ea38f869-d755-40c7-9c95-e6277325b7ae\')/calendars(\'aamkadg5yzzmntvilwm3njetngi4mi04yjg4ltkyowq4njfjm2qzoabgaaaaaaatt-m8jov8ti5b1bhmg2n_bwbi3yqq_sjmsydhhux_auxfaaaaaaegaabi3yqq_sjmsydhhux_auxfaaaaaa0jaaa=\')' } 

here image clear out did in calendar: enter image description here

can tell me how know occurrence of event removed?

this seems dead end, appreciated.

just fyi: recurring event has 1 eventid , removing 1 occurrence of recurring event not send notification changetype: deleted

unfortunately api not let know occurrence has been deleted. when delete single occurrence trigger update on seriesmaster. when update comes in have calculate when meetings should occur , fetch occurrences. after iterating through occurrences can deduce occurrence has been deleted earlier calculation. since meeting recurring weekly forever, you'll want restrict timerange request occurrences from.

if using python can highly recommend dateutil package comes handy rrule class: https://dateutil.readthedocs.io/en/stable/rrule.html


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -