How to download flows.json using API

A 30 second search revealed you access it by /flows or /flow:id

Try http:/IP_address:1880/flows

For searching the forum, search admin API

And in the docs...
https://nodered.org/docs/api/admin/