Link to home
Start Free TrialLog in
Avatar of jgrammer42
jgrammer42

asked on

How do I increase the pagination of a WEB API call?

Our HRIS system is hosted by Ultimate Software.  I have a need to pull via their WEB API our employee database from them.

Their API works great using C#.  No problems.

The question I have is regarding WEB API pagination.  We have over 6,000 employees, but to get the records, I have use paging properties, which means I can only get those records in chunks of about 100 each.  This is REALLY untenable for a production system.

Does anyone know how I can pull an unlimited number of records from a WEB API call using C#?

The code snippet below is where I have to set the query and page properties to make the API work.  I can post the whole program I used to test with, if it will help.

Thank you in advance,

                   // Create a query object to find the employees:
                    var employeeQuery =
                        new EmployeeQuery
                        {
                            // Set one or more properties to search:
                            LastName = "LIKE (g%)",
                            FullOrPartTime = "=F",

                            // Set paging properties:
                            PageSize = "10",
                            PageNumber = "1"
                        };

Open in new window

Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

my question is why do you need all or nearly all of the records?
Avatar of jgrammer42
jgrammer42

ASKER

Hi David,
First, I think I figured out how to do what I want to do.  I can just iterate through the pages with a FOR loop and write them out.  

The reason I needed to do this, is I need that list to update a sales information management system.   The sales system is not, and will never be, accessible by the internet.

Thank you, Jeff
ASKER CERTIFIED SOLUTION
Avatar of jgrammer42
jgrammer42

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial