The following types can be used with the API methods.
Traditionally, a flow configuration has been represented as a flat array of node objects.
From Node-RED 0.13, an api was added to allow flows (aka tabs) to be maintained individually. Those apis use a richer format for the flow configuration. We will be updating the main flow configuration to use this richer format in the future, but for now the two formats have to co-exist.
A Node represents the configuration of a single node within a flow.
Field | Description |
---|---|
id |
The unique id of the node |
type |
The type of the node |
x ,y |
The x/y co-ordinates of the node when the flow is drawn |
z |
The flow, or subflow, the node is a member of |
wires |
The wires the node’s outputs are connected to |
* | Other fields as defined by the particular type |
If the node is a config node, then it must not have the x
, y
or wires
properties.
A Subflow node represents the configuration of a subflow.
A Complete Flow configuration represents the entire set of flows active in the
runtime. It is represented as a flat array of Node objects. This is the main flow format used by the /flows
api and imported/exported by the editor.
Since 0.15.0, the /flows
api supports a new format if the Node-RED-API-Version
header is set to v2
. This format provides the array of nodes as above, and includes
an optional revision identifier for the flows:
A Single Flow configuration represents what gets presented in the editor as a tab.
Field | Description |
---|---|
id |
The unique id of the flow |
label |
A label for the the flow |
nodes |
An array of the Nodes in the flow |
configs |
An array of the Configs in the flow |
subflows |
An array of the Subflows in the flow - only used when representing the global flow configuration |
A Node Module represents the collection of Node Sets provided by an npm package.
Field | Description |
---|---|
name |
The name of the module - as defined in its package.json |
version |
The version of the module - as defined in its package.json |
nodes |
An array of the Node Set objects provided by this module |
A Node Set represents the collection of types provided by a single file within
a Node Module. They correspond to the entries in the node-red.nodes
property
of the module’s package.json
.
Field | Description |
---|---|
id |
The ID of the set - module/name |
name |
The name of the set - as defined in the module’s package.json |
types |
A string array of the node types provided by this set |
enabled |
Whether this set is currently enabled |
module |
The name of the module providing the set. A value of node-red indicates the node was loaded from copied in files, rather than an npm module. |