I am trying to create new flow with pre define id that I have created.
But using Node-Red API setting the id in post flow it is getting ignored.
To reproduce (I use Postman) create post
request to http://localhost:1880/flow
with raw JSON body
{
"id": "aabb",
"label": "Flow 14",
"nodes": [ ],
"configs": [ ]
}
After sending request the flow-id will be different than aabb
, in my case it was 633ddecdd201819b
.
Is there a way to set the id of the flow when it is being created?, I don't think this is a bug since the post flow API is stating
The runtime will assign a new id for the flow. If the provided flow configuration object includes an
id
field it will be replaced and thez
property of all nodes updated to match.
which I don't understand why so posting the reason is also welcomed.