Are you referring to the use-case whereby you define an API as a flow and want to update that flow (and hence the API) on Node-RED?
For example, I want to build an API that returns the same value that I submit, this flow:
[{"id":"1bf50e3cd4595706","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"0835a666bda903a2","type":"http in","z":"1bf50e3cd4595706","name":"","url":"/myapi/v1/:value","method":"get","upload":false,"swaggerDoc":"","x":670,"y":562,"wires":[["33466762a8e9f546"]]},{"id":"33466762a8e9f546","type":"change","z":"1bf50e3cd4595706","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{ \"value\": $$.req.params.value }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":951,"y":533,"wires":[["5bd25c7207a95de1"]]},{"id":"5bd25c7207a95de1","type":"http response","z":"1bf50e3cd4595706","name":"","statusCode":"200","headers":{"content-type":"application/json"},"x":1192,"y":580,"wires":[]}]
It defines a http-in node with a path of /myapi/v1/:value
, the response becomes a json:
prompt> curl http://mynoderedhost:1880/myapi/v1/dddd
{"value":"dddd"}
that for me is a flow that "defines an API" that can be accessed from external servers.
If I modify that flow and want to update Node-RED with it, then I have to use the admin API to do a PUT /flow/1bf50e3cd4595706
(since the id of the flow is 1bf50e3cd4595706
). So the Node-RED instance is the host of the API and needs updating if the API should change.
That would update the flow which defines the API endpoint. It would also restart NodeRED so the change should be immediate.