Is the nextSyncUrl valid for the lifetime of a an application? Can I do an initial sync and then use this for all users? We have an application using a proxy service that exposes the api. And I want to ship a pre-populated DB. Thought is storing the nextSyncURL in the DB and subscribing to that to sync with. We don’t want to sync all the initial data because the set if large to transfer (5MB JSON uncompressed).
nextSyncURL doesn’t have an expiration timeframe and it should be valid for the lifetime of an application. The value should only change when a new initial sync request is sent to a given space.
That being the case, could explain your use case a bit better? The
nextSyncUrl is gotten from your initial sync, so you’d have to send this first request in order to perform your subsequent calls.
I am working on an iOS application with a very very large content set (8MB of JSON and growing). We hit contentful through a proxy API our login and such. The idea is write a mac app to build the initial set and save the update URL in the database.
When we login we get the delta then get updates every hr or so.
That would indeed be a reasonable use of the Sync API, as you indeed would only have to request the initial set once.
Another consideration may be using our Webhooks API, as that would only notify you of changes that happen and take away the need to periodically sync content every hour.
Let me know if you have any other questions
@gabriel I was looking at the web hook API and there would no way to use that on a mobile device where IP changes happen frequently and can be behind routers with private addresses. So far sync API looks to be my best.
Hi @scott.andrew, that would indeed be the true and you’d need a static endpoint to receive the calls from our Webhook API. From that standpoint, it might be advantageous using the Sync API, but it should also be possible to establish such an endpoint at a given middleware amongst your applications.