-
Notifications
You must be signed in to change notification settings - Fork 15
Add a basic API page #6
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Geoffrey Biggs <[email protected]>
| ``` | ||
|
|
||
| :::warning[Security warning] | ||
| If your Booklore instance is exposed on the public Internet, be careful about exposing the API port. |
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.
Note that with the default configuration, most of the API is publicly exposed anyway. The issue is that accessing the swagger documentation doesn't fall under /api, and paths outside of this one are not forwarded to the back-end, but to the front-end. Any actual API endpoint (or rather, anything under /api) is publicly accessible already through the 6060 port.
| To get an API token you can use, you will need to sniff the requests being made by your web browser. | ||
| Open the Booklore UI in your web browser and log in as an administrator user. | ||
| Then, open the web developer tools for your browser. | ||
| In Firefox and Google Chrome, this is done using the keyboard shortcut `Ctrl-Shift-I`. |
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.
Or Cmd-Shift-I on macOS
| Once the API is exposed, you can access the live API documentation at the following URL. | ||
|
|
||
| ``` | ||
| http://localhost:8080/swagger-ui/index.html |
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.
This seems to be no longer the correct url.
On version v1.10.0 its under:
:6060/api/v1/swagger-ui/index.html
This PR adds the start of a page about using the API. It describes how to expose the API, where to find the live documentation, and how to get an API token; the API token information will need to be replaced when BookLore gains the ability to generate API tokens.