Using x-showpad-scroll-id - I am passing the id obtained in the first run to the second batch but I get the same ID
I am trying to create a pagination process to get all data I need from events table, when i run the API request I get a x-showpad-scroll-id, and for the second batch I add it to the headers expecting to get a new one but the same id is comming from the second request. The documentation is not very clear on how to use this x-showpad-scroll-id so I was wondering if perhaps I am passing the scroll id in the incorrect way. can someone give me an example on how to pass the x-showpad-scroll-id to the next request?
-
Official comment
Hi Sara
Thanks for your question and happy to elaborate.
The X-Showpad-Scroll-Id header does not change with every response. It remains valid for x-amount of time. Always use the X-Showpad-scroll-id header from the response in your next request.
The header gives the API a reference to who is making the call and will return the next batch of reports.The section "Control returned items with the X-Showpad-Scroll-Id header" in this article will give you a more detailed explanation on the "x-showpad-scroll-id"
Please sign in to leave a comment.
Comments
1 comment