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

How do I use the gRPC Gateway API? #33

Open
unixfox opened this issue Mar 13, 2019 · 6 comments
Open

How do I use the gRPC Gateway API? #33

unixfox opened this issue Mar 13, 2019 · 6 comments

Comments

@unixfox
Copy link

unixfox commented Mar 13, 2019

I found here #8 that it's possible to interact with the API using HTTP but I don't really know the endpoints of that API, is it possible to help me how to find them or maybe add swagger for an easy use of the API?

@ehazlett
Copy link
Owner

It was started as an experimental feature (https://github.com/ehazlett/stellar/blob/master/api/services/cluster/v1/cluster.proto#L17). I think we should add some more routes and investigate to see if this is the way we want to go or possibly pull the HTTP gateway out into a separate project and keep the core clean.

@unixfox
Copy link
Author

unixfox commented Mar 14, 2019

Thank you for your reply. I don't mind using the actual gRPC API instead of the gateway one do you have any tips for me to know the endpoints? I tried to use grpccurl but it requires building a protoset and it's quite complicated for me due to the fact that I don't really know golang.

@ehazlett
Copy link
Owner

If you are using Go you can just use the Stellar Client (https://github.com/ehazlett/stellar/blob/master/client/client.go#L47). That's what Stellar uses internally for all API operations.

@unixfox
Copy link
Author

unixfox commented Mar 14, 2019

I'm not familiar with Golang what if I want to interact with the gRPC API using NodeJS for example?

@ehazlett
Copy link
Owner

Typically you would generate using the protos for whatever language you want.

@ehazlett
Copy link
Owner

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

No branches or pull requests

2 participants