# API: Install Flows and Modules automated via API Requests

**URL:** https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962
**Category:** General
**Created:** [5 June 2023 13:50 UTC](https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962 "2023-06-05T13:50:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hinrich](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@hinrich](https://discourse.nodered.org/u/hinrich)
#### Post date: [5 June 2023 13:50 UTC](https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962/1 "2023-06-05T13:50:47Z")

</div>

Hey Node-Red Admins,

I try some Node-Red automation on installing flows and modules via Admin API where I need your help.

Actually I can load a preset of flows via post /flows api method. The the flows are installed but missing some nodes from additional modules original installed via palette. I can install the missing node modules via post /nodes API method manually but where can I get the module name from the missing nodes when I try to automate it?

Using api method get /flows will list all flows and node types. The node Json blob does not include the node module name! With the types list in the json I can parse against the get /nodes result. But when it is missing i am out off the module name to install it via post /nodes module name

Thank you for any ideas or tipps.

---

<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: [5 June 2023 14:10 UTC](https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962/2 "2023-06-05T14:10:17Z")

</div>

Welcome to the forum @hinrich

You can get the required nodes from the package.json of the source system.

---

<div class="post-metadata">

### Author: ![hinrich](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@hinrich](https://discourse.nodered.org/u/hinrich)
#### Post date: [20 June 2023 07:54 UTC](https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962/3 "2023-06-20T07:54:21Z")

</div>

@colin0031  
Thank you for your reply.  
When I import a new flow with an node that is not yet installed, the packag.json does not contain the node\_module name. The node module name will be written to the package.json after installation via npm or palette module manager. This is exactly the step I try to automate. But it looks like i have to declare the module names separately.

---

<div class="post-metadata">

### Author: ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)
#### Post date: [20 June 2023 18:42 UTC](https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962/4 "2023-06-20T18:42:32Z")

</div>

> [@hinrich](#):
>
> But it looks like i have to declare the module names separately.

Most probably you have to. There's no data referencing the (e.g. npm) package name of a node in the flows json. If you try to guess the package name, you may even fall over ambiguities - as there's no mechanism to ensure that a node name may only be used once in the Node-RED universe...

---

<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: [19 August 2023 18:42 UTC](https://discourse.nodered.org/t/api-install-flows-and-modules-automated-via-api-requests/78962/5 "2023-08-19T18:42:56Z")

</div>

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