Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Changes to flow endpoints and Node-RED proxy #145

Open
spg-matt opened this issue Jun 16, 2018 · 0 comments
Open

Changes to flow endpoints and Node-RED proxy #145

spg-matt opened this issue Jun 16, 2018 · 0 comments

Comments

@spg-matt
Copy link
Contributor

As of today you can make requests to /flow/{name}/data and /flow/{name}/config these requests are then forwarded to Node-RED for handling. This results in a lot of extra nodes in the sources to handle these requests. For the most part a GET /flow/{name}/data does the same thing on each source: it gets the channel data from ES. However a POST /flow/{name}/data is used to do special things for both the CSV, push API, and other flows.

I propose that we enhance the proxy logic. For each requests on one of these endpoints we:

  • Proxy the request to node red
  • If we receive back a 404 from node red then we use logic in the API to handle the request.
  • If we receive a good result from node red then we return the response from node red.

In this way we can remove the endpoint flows from each source in most locations, yet leave them in place where needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant