event-gateway
event-gateway copied to clipboard
Add support for fetching list of spaces being used
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!
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?
Totally +1 for that. That's natural step forward in Config API.
@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
(I think this should be a different issue but didn't want to pollute the tracker much)
@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.
@mthenw Thanks again for the fast response. Totally understand your opinion 👍