APIs & Integrations

Syncari
Participant

Search API and result consistency during pagination

Hello,

   This is a classic problem in many systems that support pagination

* Use contact search API with lastmodfieddate GTE <somevalue> . This returns page 1 , say with 100 recordss
* Before page 1 is processed on the client side and a call is made to page 2, a few records from page 1 arre updated n hubspot (manually or through other integrations etc)

* The client now asks for page 2 using the "after" property, but with same search criteria

* This page will skip a bunch of records because of the "after" property

 

There is no realiable way to pull records consistently using an offset based pagination strategy, when the properties used in search change.

 

Systems that support it well allow using an additional immutable, sortable property or use an opaque "cursor" to paginate rather than offsets. 

Any workarounds for this? (I know we can use webhooks, but it needs a different architecture altogether)

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

Search API and result consistency during pagination

Hi, @Syncari 👋 Let's see if our community has any thoughts or workarounds for you. Hey, @Teun @LMeert @Kevin-C do you have any tips or thoughts for @Syncari?

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes