Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jan 14, 2024 09:52 AM
I'm creating a new extension that will automatically update records in a table based on data returned from a server API endpoint that I control.
This API computes a lot of data and will take longer than 30 seconds to respond, so this can't be a normal synchronous API call.
What is the best strategy for doing this in my extension? I can think of three possible ways -
* Can extensions listen for webhooks, where I call an API and get a webhook back some minutes later?
* Or maybe the server writes directly to the table when the data is ready - can an extension facilitate this automatically?
* Alternatively, can I have my extension automatically & continuously (without user interaction) poll an endpoint every hour for new data and update the table?
Thanks for your ideas!
Solved! Go to Solution.
Jan 14, 2024 03:16 PM
I am unsure about options 1 and 3, but 2 is straightforward and will work.
Jan 14, 2024 03:16 PM
I am unsure about options 1 and 3, but 2 is straightforward and will work.
Jan 14, 2024 04:34 PM
Ah - that makes sense. The user installs the extension, then does the OAuth flow so that I can send async updates.
It looks like that is what e.g. Data Fetcher does, based on their docs.