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

remove API to lists all entities in a namespace? #3153

Closed
rabbah opened this issue Jan 6, 2018 · 5 comments
Closed

remove API to lists all entities in a namespace? #3153

rabbah opened this issue Jan 6, 2018 · 5 comments

Comments

@rabbah
Copy link
Member

rabbah commented Jan 6, 2018

The API currently supports a GET on /namespaces/_ which returns all the entities in a namespace. This is used in wsk list for example to show actions, triggers, rules, and packages.

The view supporting this API call is redundant with other views and takes up space in the database for the convenience of replacing 4 calls with 1. This view is also reduced in the controller which makes it harder to stream the response directly from the db to the client. Clients on the other can make 4 calls if needed, and this would provide a more consistent experience for using skip, limit per entity type (and count once that's added).

Thoughts?

@starpit
Copy link
Contributor

starpit commented Jan 6, 2018

i think this is a good idea. all of the Read APIs should use streaming, never touching the controller's scala heap. plus, the list api can easily be implemented client-side, possibly with a more attractive user experience: the UI can begin rendering as soon as any one of the four sub-requests completes.

@csantanapr
Copy link
Member

better yet if you have a hand full of triggers, you don't need to fetch all your 1000 actions to get the trigger list.

@krook
Copy link
Contributor

krook commented Jan 9, 2018

Would this change anything from an end-user perspective when calling wsk list? That is, with this REST API change, would there be an associated change to the CLIs so that the command returns the same thing or would the user now have to list actions, triggers, rules, and packages separately?

@rabbah
Copy link
Member Author

rabbah commented Jan 9, 2018

wsk list can preserve the behavior today, this is an implementation detail, not a user facing change otherwise.

@csantanapr
Copy link
Member

better yet if you have a hand full of triggers, you don't need to fetch all your 1000 actions to get the trigger list.
ignore this, we already have this on /triggers, is all efficiencies on dealing with views.

@rabbah rabbah closed this as completed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants