Reputation: 863
I've modified the official PHP example to get more than 10 calendar events
Here is the original OData query:
$getEventsParameters = array (
// Only return Subject, Start, and End fields
"\$select" => "Subject,Start,End,Location,Attendees,Organizer",
// Sort by Start, oldest first
"\$orderby" => "Start/DateTime",
// Return at most 10 results
"\$top" => "10"
);
I changed into:
$getEventsParameters = array (
// Only return Subject, Start, and End fields
"\$select" => "Subject,Start,End,Location,Attendees,Organizer",
// Sort by Start, oldest first
"\$orderby" => "Start/DateTime"
);
But I'm still only getting 10 events returned. Why?
Upvotes: 1
Views: 2267
Reputation: 17702
10 is the default page size. To get more, put the $top
parameter back in and increase it. The maximum is 50.
Since April 2017, the maximum is 1000 see Microsoft Blog
Upvotes: 6