Fe_Rojas
Fe_Rojasβ€’5w ago

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:
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.
Jump to solution
4 Replies
Gaurav Chadha
Gaurav Chadhaβ€’4w ago
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-api
REST 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.
Fe_Rojas
Fe_RojasOPβ€’4w ago
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
Gaurav Chadha
Gaurav Chadhaβ€’4w ago
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.
Fe_Rojas
Fe_RojasOPβ€’4w ago
Great! Thanks πŸ‘ !