Admin HTTP API POST /flows -- FORCE MERGE

Hi,

I am programmatically adding a subflow reference when needed. I'm pulling the current flows, adding my reference, then POSTing back to /flows. In the GUI, it asks to merge (there are no conflicts).

Is there a way to force a merge if there are no conflicts when POSTing to /flows?

Thanks

No. The merge is done locally in the editor. It is not done in the admin API call.

This is a whole area we need to improve the user experience of.

Thanks for the rapid response. Really appreciate it.

Let me explain what I am trying to accomplish. I've built a system whereby instruments are auto-configured as they attach. Each new instrument requires an instance of a single flow, using different ports, so I have an env variable for the flow's port.

When I inspected the json when prototyping, it was clear how to add a reference to an existing flow with env variables set to that specific instance. So I GET flows, add the reference and POST to flows the entire json:
{
"env": [{
"name": "MQTT_OUT_PORT",
"type": "str",
"value": "99999"
}],
"id": "ID",
"name": "",
"type": "subflow:26b0afbe.7b534",
"wires": ,
"x": XXX,
"y": YYY,
"z": "33f594ef.a2f17c"
}

I sed my instance values in for MQTT_PORT, XXX, YYY and so long as I seed the initial flows with my original json, all is fine. As a part of the automated setup process to add a new instrument, the only thing preventing this to be 100% automated is the requirement to click MERGE in the UI.

IF just calling /flow with a new reference doesn't bring up a MERGE, I could try to refactor with that approach. Not sure how to transform the above to a /flow payload that will add without a MERGE request. If you think this is the right path, please let me know.

Guidance appreciated and thanks again.

Any change to the flows in the runtime will cause the editor to notify the user that something has changed and that they need to merge those changes into their local workspace to avoid overwriting those changes when they next hit deploy. There is currently no way to avoid that.