We are building a Terraform module to export conversation details, but the documentation is ambiguous regarding pagination. The endpoint supports both page and cursor parameters. We observed that using the page-based approach occasionally results in duplicate records when data changes during the export window.
Is there a recommended pattern for handling this drift? We currently increment the page number until nextPage is null, but the cursor mechanism seems more solid for large datasets. Has anyone implemented a reliable loop for this in Python?