I understand from the Pagination documentation about the LO SOAP API that we need to specify a page size and page number in each request. However, when trying to query for all records in a given table - say, Constituent - it's difficult to figure out what page number contains the last set of records for a page size. Is there a way to either get the API to determine the “final page number”, or to specify a negative sequence index like -1 to get the last page?
Currently, if I have a page size of 1000 and I want to know how many page numbers to iterate through, I either have to iterate through some sets of big numbers until the request returns nothing, or set the page number to an artificially high number like 5000 where I'm reasonably certain that'll return nothing (and hope that we don't have 4999 pages of records currently). We have scripts that will then iterate through each page and get the data for us, where we specify the page size to use and a start and end page number.