-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add a field to the API endpoint /api/pages/{id} to get the raw html #4310
Comments
This is something we should support otherwise it's not possible to reliably create an external page editor, or even a proper fetch + update flow, without messing up include tags. |
Same need with different Use Case here. At IN2P3-CC, we're planning to manage part of our documentation from Gitlab. Since the The solution we're planing to use updates the page on each call. As you may expect, this is not ideal and pollutes Activity Log. If we are given access to the exact HTML that was initially sent to |
To provide a way to see the original un-pre-processed database HTML content. For #4310
I have now added this within 8b935e7, and it will be part of the next release. @riton Just a note on your use-case, this new property will provide the raw html stored in the BookStack database. Since it sounds like you just need to check if the content matches your Gitlab side of things (One-direction check), here's a potential creative workaround: Create a hash for the incoming gitlab content on change. Store that hash (locally to API system, or could sneak it into BookStack content or as a page tag), then on next update, compare the existing hash (if exists) to the new Gitlab content hash, update only if hashes differ. |
Thank you very much for devolping this endpoint! It helps a lot. |
As suggested by @ssddanbrown
We're appending a |
API Endpoint or Feature
Add a field (raw_html) to the API endpoint /api/pages/{id} to get the raw html (with includes ids on it, not the replaced html)
Use-Case
I am creating a database to keep track of reused content so, if anyone deletes that content, he gets notified that the content that he's about to delete is reused in a given page.
As this tracking is not in the roadmap, I'm building this in a django external system, but I need that field in the endpoint to get the data I need.
Additional context
No response
The text was updated successfully, but these errors were encountered: