JSON Representation of a Flow

Hello,

I am just wondering if it is possible to get the JSON representation of a flow in an automatic way (by writing some code) without the need to export it and copying it to the clipboard (for example when I click on Deploy).

Thanks in advance!

You could use a Watch node watching the file, and each time it changes do what you want. However I am not sure what would happen on a full deploy or a deploy of the watch node, so you might need to do something else to cope with that. Something like store a hash of the file in persistent store and check it on startup to see if it has changed.

Sounds like you just need to do an http GET of the admin api endpoint /admin/flows. This returns the flow that is currently running as JSON.

These and other apis are documented on these pages...