Named access to flows with the Admin HTTP API

I'm closely following this documentation to control Node-red with HTTP API. Maybe I'm not understand fully how it works, but I can only target flows, subflows by their ID? This is problematic, because if I want to create an external API, like an express or Next.js app to send GET and POST requests to this API, first I have to download the entire flows, find my object by name, get the ID of that object, now I know where to send my POST request to trigger that flow.

For dashboards, HMI panels, pragmatic named REST routes would be SOOO nice!

Example request:

$ curl -H 'Node-RED-API-Version: v2' http://localhost:1880/flow/bd891d076a5a01e3 | jq '. | select(.label=="API test") | .nodes'

Wouldn't be much nicer to do something like?

$ curl -H 'Node-RED-API-Version: v2' http://localhost:1880/flow/named-subflow/named-inject-node | jq '.'

What if we get an option to modify the automatically generated object ID for whatever we want and query that like in any REST or MQTT route? Of course, you also have to provide named objects.

The current option is to implement something like "HTTP in", "HTTP response" flows, which is fine, but Node-red also has an integrated API with authentication, so it could be also used for this case (I hope).

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