-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Local Rest Server & API Instructions #881
Conversation
There was an issue with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a newbie with very little familiarity (but some) with REST, I don't feel like I have enough info to follow this document and get stuff to work... It's cool if we are targeting this at folks with a larger familiarity level, but then we should be more specific what kind of background info we require for people to be able to follow.
I think we should make it as accessible as possible, please continue to ask questions & leave feedback about things that don't make sense. Thanks! |
Thanks. I did not want to come out as TOO annoying :-) |
Made medium edits throughout the doc's text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, Arun. I made my changes in a distinct commit. Otherwise, LGTM!
P.S. Please peer test all commands here and in all docs. |
Awesome! Thanks Clay, can I close this PR and let you submit the commit with your changes? |
Ignore that I will submit this and let you submit the changes on top of it. Think @awelc will also be adding more to this as well. Thanks everyone :) |
I don't think I will have time to work on this before Monday, particularly that neither this PR nor the following one by @Clay-Mysten are in yet... FYI, the plan was to expand examples a bit so that it's clear what should go into the likes of |
Hi team, to be clear, I made my edits as a commit to this PR: So my changes are in. As I do, I say we get this content in and more eyes on it. Then iterate. We can revisit the outstanding comments here and even add them to the following issue (or anew) for tracking: |
I cannot submit this without approvals from @sblackshear & @awelc (because they requested changes). I think I addressed all the comments but let me know if I missed something |
doc/src/build/rest-api.md
Outdated
|
||
The recomended way to test the Sui REST API is to use Postman. | ||
|
||
Postman is an API paltform for building and using APIs. Postman provides an alternative solution to accessing APIs over issuing curl commands in a terminal. You can use variables rather than copy-pasting addresses & object ids for each call in a terminal. We have provided a sample Postman runbook for you to use. Click `Run in Postman`, login and import the collection into your workspace and fire calls at the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Postman is an API paltform for building and using APIs. Postman provides an alternative solution to accessing APIs over issuing curl commands in a terminal. You can use variables rather than copy-pasting addresses & object ids for each call in a terminal. We have provided a sample Postman runbook for you to use. Click `Run in Postman`, login and import the collection into your workspace and fire calls at the network. | |
Postman is an API platform for building and using APIs. Postman provides an alternative solution to accessing APIs over issuing curl commands in a terminal. You can use variables rather than copy-pasting addresses & object ids for each call in a terminal. We have provided a sample Postman runbook for you to use. Click `Run in Postman`, login and import the collection into your workspace and fire calls at the network. |
- Refer to [Postman](https://learning.postman.com/docs/getting-started/introduction/) documentation for more general usage information. | ||
|
||
### Sui Network Endpoints | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it's super obvious that the result of running curl commands is JSON, but if it's not perhaps we could say something like this here:
"Below we provide a list of network endpoints - a result of running each command is in JSON format but we omit output for brevity as it can be quite long"
Edit: Actually, I think it makes sense to show the output, at least in some cases (it's OK to abbreviate it). See other comments below.
Returns the list of objects owned by an address. | ||
|
||
```shell | ||
curl --location --request GET $SUI_GATEWAY_HOST'/objects?address={{address}}' | json_pp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it's implicit that {address} could be obtained from the output of the previous command, I am not sure if this will be immediately obvious.
What I would do (and actually I CAN do it rather than this being part of this PR) is to show some output and point to it showing subsequent commands, much like it's done in wallet.md.
That's strange - one approval should be enough. I approved, but I am not sure if it unblocked it... |
Thanks, think I still need @sblackshear's approval and I can merge. I also thought one approval would be enough 🤷🏽
|
I think you should be able to dismiss my review... let me know if this doesn't work in the future and we can change the settings! Dismissing it and merging for now. |
Added documentation to get anyone started with using the rest apis against a local rest server & local sui network.