Skip to content
New issue

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

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

Already on GitHub? # to your account

Subscription name #4392

Open
1 of 3 tasks
tzzed opened this issue Aug 11, 2023 · 2 comments
Open
1 of 3 tasks

Subscription name #4392

tzzed opened this issue Aug 11, 2023 · 2 comments

Comments

@tzzed
Copy link
Contributor

tzzed commented Aug 11, 2023

Is your feature request related to a problem / use case? Please describe.
After subscribing, if I need to get a specific subscription, today I should use the URL to ensure that the wanted subscription is that I need.

To use GET subscriptions/{id} we should know the id, I see only one way that is to getAll subscriptions and find the good id by using the notify url as I said above.
An alternative is to use the returned Id in the location header but once I have to choice, save it inmemory or using a KV db or cache to save the {sub:id} kv.
For me is too much, for retrieving subcriptions easily.

Describe the solution you'd like
It will be good to have a subscription Name that can be correspond to the subscribed service.

Describe alternatives you've considered
I check if the url notify urls match.

Describe why you need this feature
I want to update the subscription.

Do you have the intention to implement the solution

  • Yes, I have the knowledge to implement this new feature.
  • Yes, but I will need help.
  • No, I do not have the skills.
@tzzed tzzed added the backlog label Aug 11, 2023
@fgalan
Copy link
Member

fgalan commented Aug 22, 2023

Instead of introducing a new field in the subscription document, why don't use the existing description field?

Next, a q query parameter could be implemented to return subscriptions that match a given description, similar to the way GET /v2/entities works (although in the case of subscription it would be simpler), eg:

GET /v2/subscriptions?q=description:mysub1

@fgalan
Copy link
Member

fgalan commented Aug 22, 2023

It would be great implement also the regex search (see https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#simple-query-language), eg:

GET /v2/subscriptons/q?description~=mysub.*

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants