Updating node-red project API

Hello!

I’m working on setting up a CI pipeline for our node-red project and and I would like to automate the deployment to target.

I thought maybe I could use the node-red admin API.
More specifically the POST /flows.

However, when I try to use the API all I get is this:

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.20.1</center>
</body>
</html>

Is the node-red admin API not available on the groov EPIC?
Are there any alternative methods you recommend?

Welcome the forums Erik.

Node-RED is behind the groov Manage authentication service.
What port number did you try when you tested this?
The URL would have to be https (port 443) and have the /node-red/ path.

1 Like

To authenticate with groov devices you’ll need a groov Manage admin API key, not the Node-RED admin tokens, and like @Beno said you will use the https and the /node-red/ path instead of port 1880.

In this case /nodes is the NR admin API endpoint which you can swap out with whatever you need.
Here’s a rough, example:

curl -X 'GET' \
  'https://hostname/node-red/nodes' \
  -H 'accept: application/json' \
  -H 'apiKey: dZJpjzLX2XcpHUyPDK6jfKVvZAXckk4g'
1 Like

Thank you Beno and torchard!

I missed both the https and node-red path. The API seems to work fine now.

2 Likes