# Disable/Enable flow Tab via Admin API

**URL:** <https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527>\
**Category:** General\
**Created:** [14 January 2024 06:09 UTC](https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527 "2024-01-14T06:09:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [14 January 2024 06:09 UTC](https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527/1 "2024-01-14T06:09:52Z")

</div>

Hi nodered Experts,

Just wanna know if someone here already tried to enable/disable a whole flow tab using the Admin API?  
I can actually disable / enable it however there is a strange things happen,  
If I disable the flow tab, it will delete all the nodes (content) of that Tab which is not normal.

The code below, this is how I call the admin API to disable/enable the flow.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5b7787b9d8cee17ae612a00bc91ce0fe2f78b51.png)

---

<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:** [14 January 2024 08:18 UTC](https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527/2 "2024-01-14T08:18:25Z")

</div>

You are essentially PUTing an empty flow.

Iirc, you need to send the complete set of flows (with your desired enable/disable change value) in a POST with the header `Node-RED-Deployment-Type` set to `node`  
See: [POST /flows : Node-RED](https://nodered.org/docs/api/admin/methods/post/flows/)

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [15 January 2024 05:19 UTC](https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527/3 "2024-01-15T05:19:08Z")

</div>

Hi thanks for the information! It works now 🙂  
By just giving the nodes[array], you point me on the right solutions.

---

<div class="post-metadata">

**Author:** ![vnvasireddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vnvasireddy/32/72573_2.png) [@vnvasireddy](https://discourse.nodered.org/u/vnvasireddy)\
**Post date:** [30 January 2024 10:36 UTC](https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527/4 "2024-01-30T10:36:46Z")

</div>

hello Henjoe,  
i had seen your post that you are trying to enable/disable flow in node-red. same i am also trying but was unable to do, can you please post your flow here  
it would be great help  
thanks in advance

---

<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:** [30 March 2024 10:36 UTC](https://discourse.nodered.org/t/disable-enable-flow-tab-via-admin-api/84527/5 "2024-03-30T10:36:53Z")

</div>

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