Hello everyone!
I hope you are all doing great with the development of your apps! I am creating my own and its purpose is to take the data from the API and save it to the database.
Clearly, since these are real estate, once the GET has been carried out and the most important data has been saved in the database, I would like these to be updated in real time (or almost).
Rather than randomly scheduling an update, I’ve been wondering since I noticed that my API contains a timestamp value of the last updated item, can I take advantage of it? Is there a way to be able to tell the data when the timestamp value changes?
Thank you for your help!
Bubble will run the GET call when you tell it to via Workflows if the call is setup with Use as Action. When you have it set up for Use as Data, Bubble will not update the call based on any update to the data on the side of the API provider (ie: not when a timestamp changes on the call) because Bubble only runs the call once via the repeating group.
If you are thinking about setting up an open connection to the API, you can run the API call every X seconds or so, but that will cost a lot of WUs.
You may just consider running the workflows to get the API data once a day or something like that, or check with the API provider if they offer webhooks/event notifications to ping your app when data changes in their database.