# Read subflow module info from within flow

**URL:** https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241
**Category:** General
**Created:** [21 October 2023 17:06 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241 "2023-10-21T17:06:38Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![psmtvdw](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@psmtvdw](https://discourse.nodered.org/u/psmtvdw)
#### Post date: [21 October 2023 17:06 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/1 "2023-10-21T17:06:38Z")

</div>

Is it possible to retrieve a subflow's module properties from within a flow? I want to make an overview in a dashboard of the actual versions of the subflows.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [21 October 2023 17:28 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/2 "2023-10-21T17:28:16Z")

</div>

Hi @psmtvdw

Natively - No

With a little time and effort - maybe.  
You will need to use the HTTP Admin API.

[https://nodered.org/docs/api/admin/methods/](https://nodered.org/docs/api/admin/methods/)

---

<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: [22 October 2023 09:08 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/3 "2023-10-22T09:08:55Z")

</div>

Or you could add another output to the subflow, sending all the properties out on startup.

---

<div class="post-metadata">

### Author: ![psmtvdw](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@psmtvdw](https://discourse.nodered.org/u/psmtvdw)
#### Post date: [23 October 2023 07:45 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/4 "2023-10-23T07:45:04Z")

</div>

@Colin is your suggestion based on the idea by @marcus-j-davies of using the API? Or is it another approach you had in mind to retrieve for instance the version number from a subflow?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1cd06bfce9157a9876b11064fa0b16d68f0e9acf.png)

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [23 October 2023 08:34 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/5 "2023-10-23T08:34:25Z")

</div>

Is the subflow module yours?  
If it is, then Colins suggestion is easier - as you can just code the module to output the version on start up.

But, if this is not yours and you need it for all modules you have installed, then the API will likely be where you need to go.

There is another way also, and that is to read the `package.json` file - but I don't think that will show any updates that are installed, as it only declares base versions that you installed originally.

Under a standard pi install, the file is: `/home/pi/.node-red/package.json`

`package-lock.json` however, may show actual versions that are installed - But I don't know its format that well.

---

<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: [23 October 2023 08:47 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/6 "2023-10-23T08:47:35Z")

</div>

> [@psmtvdw](#):
>
> retrieve for instance the version number from a subflow

Sorry, I misunderstood (not reading the question carefully). I thought you meant the subflow instance properties  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/776ab9898e22410c6d87e708759a5d11b6c081a7.png)

---

<div class="post-metadata">

### Author: ![psmtvdw](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@psmtvdw](https://discourse.nodered.org/u/psmtvdw)
#### Post date: [23 October 2023 20:12 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/7 "2023-10-23T20:12:40Z")

</div>

Basic example of how I implemented this API method to retrieve meta data from all subflows.

```auto
[
    {
        "id": "67d336bad523693e",
        "type": "inject",
        "z": "a0f09cc0.c983a",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 140,
        "y": 220,
        "wires": [
            [
                "8accf6f2c27aabab"
            ]
        ]
    },
    {
        "id": "8accf6f2c27aabab",
        "type": "http request",
        "z": "a0f09cc0.c983a",
        "name": "",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "http://localhost:1880/flows",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 310,
        "y": 220,
        "wires": [
            [
                "75bb9aac476c2bc5"
            ]
        ]
    },
    {
        "id": "f5d7c5fe73d56fca",
        "type": "debug",
        "z": "a0f09cc0.c983a",
        "name": "debug 28",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 940,
        "y": 220,
        "wires": []
    },
    {
        "id": "93b1aa7fbb291d15",
        "type": "switch",
        "z": "a0f09cc0.c983a",
        "name": "",
        "property": "payload.type",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "subflow",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 590,
        "y": 220,
        "wires": [
            [
                "8c40ffacd81842a9"
            ]
        ]
    },
    {
        "id": "75bb9aac476c2bc5",
        "type": "split",
        "z": "a0f09cc0.c983a",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 450,
        "y": 220,
        "wires": [
            [
                "93b1aa7fbb291d15"
            ]
        ]
    },
    {
        "id": "8c40ffacd81842a9",
        "type": "change",
        "z": "a0f09cc0.c983a",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.meta",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 760,
        "y": 220,
        "wires": [
            [
                "f5d7c5fe73d56fca"
            ]
        ]
    }
]

```

---

<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: [6 November 2023 20:12 UTC](https://discourse.nodered.org/t/read-subflow-module-info-from-within-flow/82241/8 "2023-11-06T20:12:41Z")

</div>

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