Nighthawk
Nighthawk

Reputation: 19

Calendar REST API in Office 365 APIs Preview - not all events

I am building a JS Webapp with the new Office 365 REST Api. My problem is, that I am no getting all occurence events from a Roomcalendar.

Has anybody an Idea?

I am trying to receive all Events with this URL:
https://outlook.office365.com/EWS/OData/Users([email protected])/Events?$top=100&$filter=End%20ge%202014-08-20T22:30:00Z%20and%20Start%20le%202020-12-14T22:30:00Z

Thanks in advance

Upvotes: 1

Views: 422

Answers (1)

Glen Scales
Glen Scales

Reputation: 22032

The server will page the results back to you in lots of 100 (AFIAK), your date range is quite large 2014-2020 if you have Recurring appointments with no End date your more then likely going to get pages of results. Check the Results you getting back for @odata.nextLink eg

"@odata.nextLink": "https://outlook.office365.com/EWS/OData/Users('[email protected]')/Events/?%24top=100&%24filter=End+ge+2014-08-20T22%3a30%3a00Z+and+Start+le+2020-12-14T22%3a30%3a00Z&%24skip=100"

This is what you should use to the get the next page of results

Cheers Glen

Upvotes: 1

Related Questions