Amit_Kumar | 2023-05-12 12:18:58 UTC | #1
Hello,
We are trying to fetch all locations by calling LocationsApi's get_locations method which returns LocationEntityListing.
But when we tried implementing pagination, we found that the page_count is coming None, due which we cannot iterate over all the pages.
if response.pagenumber >= response.pagecount:
If all pages fetched, done
break
for now we are sending warning
if response.pagecount is None: logger.warning(f"There is no page count for {type.value} ") break
Any help would be appreciated
Regards, Amit K
charlie.conneely | 2023-05-12 15:39:58 UTC | #2
Hello
It looks like the pageCount field should be there, but the API isn't returning it. Could open a case with Genesys Cloud Care to report this behaviour?
Until this is fixed, and as a suggestion, you could alter your logic to check if the entities array is empty. This will let you know that there are no more locations.
Thanks Charlie
system | 2023-06-12 15:38:33 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 19889