# How to create/deploy flows using Admin API without node-red editor interaction on resolving conflicts

**URL:** <https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066>\
**Category:** General\
**Created:** [8 April 2024 05:54 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066 "2024-04-08T05:54:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumarandena](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@kumarandena](https://discourse.nodered.org/u/kumarandena)\
**Post date:** [8 April 2024 05:54 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066/1 "2024-04-08T05:54:41Z")

</div>

Hi,

As part of requirement, My goal is to create, update and deploy flows using [Admin API Methods : Node-RED](https://nodered.org/docs/api/admin/methods/) without user interaction in Node-RED Editor.

I am able to,

```auto
create flow using - [POST] http://127.0.0.1:1880/flow
get flows using - [GET] http://127.0.0.1:1880/flows
get particular flow uisng - [GET] http://127.0.0.1:1880/flow/<id>
update flow using - [PUT] http://127.0.0.1:1880/flow/<id>
deploy flow using - [POST] http://127.0.0.1:1880/flows

```

I noticed while doing any create, update and deploy operations via Admin APIs, Manual interation on conflict detection and resolution dialogs are required as below,  
Conflict detection:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/8200a0be5fbeaf592114975dba876aaaecaeafb2.png)

Conflict resolution:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/745d2245b5d0e47baffd13ab634184e6495b6c98.png)

What i want to achieve is,  
1.create/update a flow/flows dynamically.  
1.deploy flow/flows(modified flow/flows as request body) forcefully without going through conflict resolving steps, not worrying about last revision.

Please suggest if there is any way to achieve this.  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 April 2024 06:38 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066/2 "2024-04-08T06:38:16Z")

</div>

> [@kumarandena](#):
>
> deploy flow/flows(modified flow/flows as request body) forcefully without going through conflict resolving steps, not worrying about last revision

I've not looked at this area of the src so don't know for certain but I think the conflict resolution is performed client side and so it's all down to the data being sent to the endpoint. Therefore, If you watch the network tab when you do this from the UI you will be able to see the difference in the payload & headers etc

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 April 2024 09:08 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066/3 "2024-04-08T09:08:45Z")

</div>

> [@kumarandena](#):
>
> I noticed while doing any create, update and deploy operations via Admin APIs, Manual interation on conflict detection and resolution dialogs are required

I don't think the manual interaction is required to perform the create, update or deploy operations via the API. Those popups are a result of having successfully done the update.

---

<div class="post-metadata">

**Author:** ![kumarandena](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@kumarandena](https://discourse.nodered.org/u/kumarandena)\
**Post date:** [8 April 2024 10:56 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066/5 "2024-04-08T10:56:26Z")

</div>

> [@Colin](#):
>
> I don't think the manual interaction is required to perform the create, update or deploy operations via the API. Those popups are a result of having successfully done the update.

You are right. But to reflect the updated changes in node-red editor, there is a manual interaction required to do conflict resolution and merge then deploy.  
Is there any way to avoid these process and still have updated changes reflected(deployed) in editor(same window, not refreshed)?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 April 2024 12:47 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066/6 "2024-04-08T12:47:58Z")

</div>

Not that I am aware of. If the browser user has not made uncommitted changes to flow then normally all you need is to hit F5 to refresh the page.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 July 2024 12:48 UTC](https://discourse.nodered.org/t/how-to-create-deploy-flows-using-admin-api-without-node-red-editor-interaction-on-resolving-conflicts/87066/7 "2024-07-07T12:48:31Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
