Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the flow/exists endpoint return the flow on success #170

Open
PGijsbers opened this issue Jul 18, 2024 · 0 comments
Open

Have the flow/exists endpoint return the flow on success #170

PGijsbers opened this issue Jul 18, 2024 · 0 comments
Labels
enhancement New feature or request proposal We want to discuss this to decide if it should be implemented

Comments

@PGijsbers
Copy link
Contributor

The PHP API returns a standard response:{"flow_exists": {"exists": true or false, "flow_id": id or -1}}. However, to retrieve the information whether or not a flow exists, we need to query the database and get just as much information as when actually returning the flow (ignoring any subflows). So returning the flow information does not generally occur much additional overhead.
It also feels like it is just another side of the same coin: you get the flow by its unique id, or by its unique combination of (name, external_version). It would make sense for me to make those endpoints behavior the same w.r.t. finding and not finding a flow.
Because of the extra network traffic (a little bit of json) and db load (in case of resolving subflows), we could also consider returning the whole flow based on a parameter, or simply have an extra endpoint that has this behavior.

@PGijsbers PGijsbers added enhancement New feature or request proposal We want to discuss this to decide if it should be implemented labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal We want to discuss this to decide if it should be implemented
Projects
None yet
Development

No branches or pull requests

1 participant