Fe_Rojas - Hi all! Anyone knows if there is a w...
Hi all! Anyone knows if there is a way to make a buildship workflow that triggers with an api request to be idempotent?
Solution:Jump to solution
Nope, it won't duplicate data, each time the user makes makes (either one or multiple) the request will take take the data from query for these methods which will be different and you can handle it on frontend side (or from where you are making the call). All executions are tracked and registered separately even if they are made at same time.
4 Replies
Hi @Fe_Rojas, you can use
GET
, PUT
, DELETE
methods in the Rest API Trigger to make an idempotent request. https://docs.buildship.com/trigger-nodes/rest-apiREST API Call Trigger β BuildShip
A unified resource to start building your backend with low-code. Dive into triggers, nodes, and step-by-step guidance to jumpstart your workflow creation.
Hi @Gaurav Chadha ! Thanks for the response π. Sorry for the ignorance but that means for example if I build a workflow that starts with a Rest API Trigger and PUT method and insert a new row in a Database, and this workflow receive a duplicated request (same data) almost at the same time (example: two clics that make a call)... It will only insert one item/row? Or do I need to make something else?
Solution
Nope, it won't duplicate data, each time the user makes makes (either one or multiple) the request will take take the data from query for these methods which will be different and you can handle it on frontend side (or from where you are making the call). All executions are tracked and registered separately even if they are made at same time.
Great! Thanks π !