Import Flows using API

Hi Node-red Experts,
I know there is an API for node-red, but I am not sure if can we import flows using it's API?
I don't want my end-user to login on my node-red and go to Menu -> Import Flows, but instead, I want to create a custom application where we can automatically import flows without doing it manually.

Hoping for your guidance.

Thank you.

With kind regards,
Henjoe

Hi @Henjoe

the runtime provides an API that lets you add/update individual flows (ie tabs) - POST /flow : Node-RED

1 Like

Hi Knolleary,

Thank you for this.
But I don't know what I am doing wrong in here, I am trying to get an access token via postman.

But I am getting an "authentication error". Any thoughts?

Don't make that request using Basic Auth

Hi knolleary,

What type of auth should I use in here?

Thanks for supporting. I highly appreciated it.

With kind regards,
Henjoe

Have a look at this page in the docs: Authentication : Node-RED

It explains how to get an access token and how to use that token when using the api.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.