Given a sharepoint list which exceeds its threshold limit of 5000 having columns as follows.
- ID (system defined identifier)
- EmployeeID
- EmployeeName
- Department
Total number of records = 34000
Requirement is to fetch all those employees which are filtered based on a specific Department using rest api. For example there are around 23000 employees under "Technical" Department.
The below query fails with 500 status code as even the number of records after filtering exceed threshold limit of 5000.
<siteurl>/_vti_bin/listdata.svc/Employees?$filter=Department eq 'Technical'&$select=Id,EmployeeID,EmployeeName,Department
It has been suggested to use pagination in
https://platinumdogs.me/2013/05/14/client-and-server-driven-paging-with-the-sharepoint-rest-api/
to retrieve list items using api in case of exceeding threshold limit. But this isn't working with the above filter.
So can anyone please help me to fetch the records in pages so that I can fetch and display a specific page of records by passing a page number as input.
Thanks,
npb