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

get all the destination from subaccout #2538

Closed
luckyliwen opened this issue Jun 6, 2022 · 8 comments
Closed

get all the destination from subaccout #2538

luckyliwen opened this issue Jun 6, 2022 · 8 comments
Assignees
Labels
feature request Requests for new functionality

Comments

@luckyliwen
Copy link

Is your feature request related to a problem? Please describe.
-Not a problem, just for some use cases that needs to get all the destinations.

Describe the solution you'd like
Provide API to get all the destinations such as getAllDestinations(DestinationFetchOptions). In some case, we need do some filter based on the destination name. So the return value can be a string array of the destination name. Then we can filter by ourselves, then call the getDestination() to get the detailed information.

Describe alternatives you've considered
As discussed in the StackOverflow question, it should be quite easy to implement such a function

Impact / Priority
Highly demand

Additional context
N/A

@luckyliwen luckyliwen added the feature request Requests for new functionality label Jun 6, 2022
@jjtang1985
Copy link
Contributor

Hi @luckyliwen,

Thanks for raising this up.
Here are some questions from my side:

  1. From the description below, I assume, you are not blocked due to the missing feature. Could you please confirm?

Not a problem, just for some use cases that needs to get all the destinations.

  1. What's your project status? Is it a PoC or go-live system? What's your time line?

  2. Could you please explain more about "Highly demand" mentioned? Does it mean there are lots of related use cases? Or maybe this is a single use case, but lots of end users need it?

Best regards,
Junjie

@jjtang1985 jjtang1985 self-assigned this Jun 7, 2022
@FrankEssenberger
Copy link
Contributor

Good morning @luckyliwen,

I just want to understand the issue a bit better. Should the getAllDestinations just return a list of destination names and you do then the filtering and call to getDestination(name) the details on the destinations you want?

This would be an easy thing to do as @marikaner mentioned in the stack issue - we have the code anyway and just need to export it.

If you would need the full objects, I am a bit concerned that method could run into performance problems if you have many destinations and I would prefer to keep it simple. So you just get a list of names and it is your responsibility to filter and make the following calls in chunks so that it is not overloading the destination service.

Best
Frank

@FrankEssenberger
Copy link
Contributor

I had a call with the colleague and they have the requirement:

  • They need the destination properties as well to do some filtering so name is not enough
  • They do not need the full destination with the expensive auth token
  • The API should be similar to the getDestination where you just hand the JWT and all token exchange is done for you

@krisho007
Copy link

I am building a SaaS solution using NodeJS in BTP. This tool needs to connect to various external systems via 'BTP Destinations'.
So the user needs to select a destination from a list of destinations. For this use case, I need an API that can list ALL destinations.
https://answers.sap.com/questions/13718193/cloud-sdk-get-all-destinations.html

I see that the Java flavor already has this API. Can you please provide it in Javascript flavor as well?

@tomfrenken
Copy link
Member

Hey, @krisho007 thank you for your feedback,

I'm currently implementing this function, however, there are many possible sources for destinations, some of which won't serve a purpose for the user unless they have a very specific use case, such as provider- or service-binding destinations.
Therefore my question is: If you say all destinations, do you refer to all subscriber destinations which are in the destination service, or literally all?

@jjtang1985 jjtang1985 assigned tomfrenken and unassigned jjtang1985 Sep 9, 2022
@krisho007
Copy link

For my use case I just need subscriber destinations.
But I feel there might be scenarios where we might need provider destinations as well. But do not see a scenario where we need destinations within other subscribers.

Hope that answers your question.

@tomfrenken
Copy link
Member

Hey @krisho007 and @luckyliwen we've just added the requested function, as documented here.

It will be available to you with the next release, which will come later in the afternoon.

@tomfrenken
Copy link
Member

I'll close the issue. If you have further requests or issues with the function, feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new functionality
Projects
None yet
Development

No branches or pull requests

5 participants