Reputation: 817
I'm making a SOAP call to a web service that returns a paginated response. Zeep is the only Python library I've found that even works for this web service.
When I make the call, it returns the first 100 records (1 page) of results. How do I either call again for the next page (repeat until done), or specify that I want all of the pages?
Upvotes: 1
Views: 1247
Reputation: 72
Create a dict with the request criteria. Grab the first page of results, parse the request for the total number of pages, and setup a loop.
In the case of Workday:
request_crit = {'Response_Filter' : {
'Page' : 1,
'Count' : number_results,
'As_Of_Entry_DateTime' : your timestamp,
}}
response = service.get_schools(request_crit)
#process the response
request_crit=['Response_Filter']['Page'] +=
Upvotes: 2