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

Bookstack Version via API #3343

Closed
chrisnails opened this issue Mar 23, 2022 · 4 comments
Closed

Bookstack Version via API #3343

chrisnails opened this issue Mar 23, 2022 · 4 comments

Comments

@chrisnails
Copy link

API Endpoint or Feature

It would be helpful if i could get the current Version of the Bookstack Instance via the API

Use-Case

I'd like to add a Check in my Monitoring System to get notified if my Bookstack Instance is not on the latest Version.

Additional context

i can check the latest bookstack release like this
curl -sL https://api.github.com/repos/BookStackApp/BookStack/releases/latest | jq -r ".tag_name"
i just need somethign similar for Bookstack itself, compare Versions and Notify

@ssddanbrown
Copy link
Member

Hi @chrisnails,
The version is used as a cache breaker on asset urls so it is possible to do the following:

curl -sL https://demo.bookstackapp.com/ | grep -oPm 1 "(?<=version=)v[0-9.]+"

If you need more than that, we do have a status endpoint we could maybe add the version to. I do wonder though if our usage of the version in such a status endpoint (and the existing cache breaker usage) would be a security concern for some (for those that want more obscurity).

Maybe we could add a new api-side /system endpoint which shows additional detail such as app name and app logo and the version. Just trying to avoid single-use-endpoints if other similar details also get requested.

@chrisnails
Copy link
Author

hi @ssddanbrown,
thanks for the quick answer!
For my current use-case, the cache breaker angle works fine.
But i agree that this Info might better be kept behind authentication.

@ssddanbrown
Copy link
Member

Cool, since the cache breaker angle works for you I'll close this off but I'll keep it in mind for the future similar requests.
If we ever break you cache breaker scraping (Probably unlikely unless we start hiding versions) then just let us know on here and we can quickly move to implement such an endpoint if nothing already exists by that point.

@Bartiff
Copy link

Bartiff commented Oct 14, 2022

I'm voting for a new api endpoint like /system!

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

No branches or pull requests

3 participants