as per API documentation it's possible to fetch the settings [GET (http) /settings ] :
I do not see implementation of POST || PUT request to update the settings.
Is that possible and not documented, not possible but planned, will never happen ?
I am installing/destroying "few" dockered nodered frequently. I love ssh && vi but redeploying settings on the machines would be much easier with a couple of curls -X POST.
Any hint is greatly appreciated.
Is curl any easier than rsync, for example.
It is not possible and there are no plans to allow the settings file to be rewritten remotely. Many of the settings require a full restart of Node-RED to take effect. Plus the runtime doesn't necessarily know where the settings have come from if NR is embedded in another app.
rsync / ansible/ chief/ puppet / ssh.... all possible.
what is important is not curl itself but shifting responsbailities.
any ssh/rsync/pdsh/ansible are really OS oriented : you must have acces to the machine itself.
curl would use node-red and then is more related to the application and not in the OS.
Thanks for the replies.
I understand and agree on the fact that chaging the settings may need need restart and runtime overwrite the settings values. But modification of the settings using whatever method does not change this. With vi or rsync (to support colin ) you still need to restart and runtime still override it. I am just suggesting an other method to change settings. That would allow a "node-red admin" and not necessarily a "system admin" to apply new settings....
I may know the reply but I guess this is not doable with a palette right ? If yes I can take that path.
I can also evaluate the impact and make a PR to add the [POST] /settings if you agree on.
By "palette" do you mean a node module? There is only one palette in Node-RED and it's the list of all nodes in the left hand sidebar of the editor.
No, it is not possible. Nodes do not have access to any of the internal APIs needed.
But I repeat, writeable settings is a hard problem and not one we plan to add. You do not know where the settings have come from - it could be a file, a database record or completely generated dynamically by some node.js code.
Even if you assumed it was a settings file, that file is itself node.js code and would be hard to update in place without risk of breaking what's in there.
Correct : palette was wrongly refering to node-contrib module.
But got it. If you change your mind in a near future let me know
Thanks for your replies.