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

Add support for fetching list of spaces being used #440

Open
kenfdev opened this issue Jun 4, 2018 · 5 comments
Open

Add support for fetching list of spaces being used #440

kenfdev opened this issue Jun 4, 2018 · 5 comments

Comments

@kenfdev
Copy link

kenfdev commented Jun 4, 2018

This is a Feature Proposal

For feature proposals, please answer the following question:

  • What is the use case that should be solved? The more detail you describe this in the easier it is to understand for us.

Use cases

Possibly an admin would like to see what functions and subscriptions are present.

Currently we can fetch subscriptions and functions with the following API.

GET <Configuration API URL>/v1/spaces/<space>/subscriptions
GET <Configuration API URL>/v1/spaces/<space>/functions

But we need to know the <space> before hand. It'd be nice if there is an API like the following:

GET <Configuration API URL>/v1/spaces

which returns a list of spaces already in use. If we can retrieve this, it's possible to retrieve all the informations (spaces, functions, subscriptions) via the API.

Would like to know if this is by design or not or if I'm missing something.
Thanks!

@alexdebrie
Copy link
Contributor

Hey @kenfdev, that's a good idea and would make it easier to discover the full setup of your Event Gateway.

@mthenw What are your thoughts?

@mthenw
Copy link
Contributor

mthenw commented Jun 5, 2018

Totally +1 for that. That's natural step forward in Config API.

@kenfdev
Copy link
Author

kenfdev commented Jun 5, 2018

@alexdebrie @mthenw Thanks! Ping me if there's any way I can help.

Also, a bit off topic but should the user be able to create and delete a space via an API?

POST <Configuration API URL>/v1/spaces
DELETE <Configuration API URL>/v1/spaces/<space>

This will probably lead to checking the existence of a space when creating functions and subscriptions which is a breaking change in the workflow.

One thing I though of is that, currently one can easily have a typo in the and accidentally create a space. Perhaps it'll be better to have a CREATE and DELETE workflow for spaces. WDYT?

(I think this should be a different issue but didn't want to pollute the tracker much)

@mthenw
Copy link
Contributor

mthenw commented Jun 5, 2018

@kenfdev IMHO until there is no properties/options that can be set on space level we shouldn't provide CRUD API for spaces and space should be created implicitly. Right now space without functions or subs doesn't provide any value.

@kenfdev
Copy link
Author

kenfdev commented Jun 5, 2018

@mthenw Thanks again for the fast response. Totally understand your opinion 👍

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

3 participants