Hi All,
I’m currently developing a Zapier integration and would appreciate some input on best practices for long running API calls.
We currently return a 201 accepted response if the API call exceeds x seconds, with a ‘location’ header specifying the URL to get the status of the call and a ‘retry-after’ header specifying how frequently to retry.
I’ve drawn a bit of a blank when searching for how to configure our Zapier action to support this. I assume I would need some custom JavaScript code that checks for a 201 response and performs some retry logic. If my assumption is correct, could anyone point me in the direction of some sample code to help with this?
The documentation I have found for long running API calls seems to recommend creating a webhook and posting the results on completion, would we be better of implementing this?
Thanks!