Skip to content

Conversation

@gbiggs
Copy link

@gbiggs gbiggs commented Oct 18, 2025

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.

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.
Copy link

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`.
Copy link

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
Copy link

@herobrauni herobrauni Nov 7, 2025

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

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

Successfully merging this pull request may close these issues.

3 participants