Hello,
Is there any way, to rollback a page to always the same version (let's say V4, so the 4th edit of the page) with only one button (not necisarrily on that page) or automatically at a set time?
My use case would be that there is a page where text (questions/answers) are inserted at a certain time, but after some time, that page should be reset to being empty again, so it can be reused without always having to either clear it manually (as some parts of the page need to stay, so that would be a cumbersome process) or scroll through the (ever growing) version list to find the right state to roll back to.
KR
RobinD
You could use the REST API to get the data with a cron/scheduled task job and then write over the existing page. This solution would require someone who can do a bit of programming.
Get a specific historical version
You can get the page storage format for a specific version below. Specifically in the JSON it is the body.storage.value node.
http(s)://{yourserver}/rest/api/content/{page id here}?version={page version here}&expand=body.storage
Update a page's body
You can do a PUT to this REST endpoint using the below JSON payload to update a page
http(s)://{yourserver}/rest/api/content/{pageid here}
JSON Payload (replace the stuff in ***????***)
{ "id": "***Page ID***", "type":"page", "title":"***Page Title***", "space":{"key":"***Space Key***"}, "body":{ "storage":{ "value":"***Page Body in Confluence Storage Format***", "representation":"storage" } }, "version":{ "number":"***New Page Version***" } }
Hi Robin,
why would you like to "delete" raised questions and their answers to it? Have you thought about just creating a new page (maybe from a template) to provide a new "blank" page for new questions and answers?
Kind regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
well, the "questions" are a bit more complex pieces, possible requests would be a better term, and there is a set timeframe, (repeating every month or so) where this exact page (so that the link always stays the same) is used for these. The end result is then exported to pdf and saved elsewhere where it is actually needed to be archived, so it does not need to clutter up the confluence space and the page is reusable. And to save on time doing things manually, (because creating the page new, resetting it manually or with the version history) would take about the same amount of time. So if there is no automated way, that will be what I have to do anyway, but I hoped a more automatic way with page-link persistence would exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.