POST /flows method


I want to update my flows remotely. So i am using an http get request to take the new flow and then using an http POST/flows request to set the new active flow configuration. The thing is that is that the new flow that i post is overriding my old flows what can i do?I dont want to use the put method because the flow is not yet created. Also when i am trying to use POST/flow method i am getting the following error : “missing nodes property at Object.addflow…” .I cannot understand the POST/flow method documentation.



Posting to /flows replaces the entire flow configuration.

If you want to add an flow, you need to PUT to /flow
If you want to update an individual flow, you need to POST to /flow/<flow-id>

The format of the flow object is different between the /flows api and the /flow api - whic is probably the cause of the error you are hitting.

If you do a GET of /flow/<existing-flow-id> you’ll see the format required by the /flow api.



Oh well i got it working. I just added my flow to the “nodes”: [ … ] element and it worked fine. Thanks for the help @knolleary!