Is it possible to set up an automation rule to remove/delete page versions after a certain limit such as page versions above 10? If so, please provide guidance on how to write the rule. Thank you.
Update 9/9/2024: It is mentioned in Atlassian documentation as a best-practice to have retention rules as "Confluence stores the previous content so you can restore it if you need to. Over time these historical versions start to add up, increasing the size of your database and attachments directory. It's not uncommon for some pages to have hundreds of historical versions, or for a space to have hundreds of items in the trash."
Does this only apply to data center and not cloud? We have Premium which offers unlimited storage but is it a best-practice to manage page versions?
I don't think that is possible.
The best app to manage content that I know of and have tested (not purchased) is https://marketplace.atlassian.com/apps/123/better-content-archiving-for-confluence?tab=overview&hosting=cloud
Even that app cannot target versions of pages yet, probably because this is not accessible in the way that you want via the API.
A solution to this problem would be great!
Deleting older versions after X days/months/years would be a good thing for me. Or when you think of this in the backup-way, deleting everything but leave the last X versions and the last version of every month.
In general this topic is more about hygiene than space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am curious about the use cases for deleting a specific version of a page. The only thing I could think of myself was to deal with a user who entered a "secret" value on a page such as a password or API token.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Someone please correct me if I am wrong, but it seems this is not possible. Either through standard components in Automation or by calling the rest api in a web request. To my knowledge you may only delete a page using the rest api and not specific versions of a page. Even if retrieving page version data is possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With the REST API it is possible to delete a specific version, send a DELETE request to the content ID / version ID endpoint:
/wiki/rest/api/content/<ID>/version/<ID>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting that a specific version can be deleted. What happens to the later version numbers: do they remain the same (leaving a "gap" in version numbers) or are they reduced by one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rick Westbrock, the version numbers will be decreased by 1, no gap will be left, and users would not have any indication that a version had been deleted.
Why would this be done? My only thoughts would be related to information lifecycle management. If an org wants to archive content but also keep the most recent 5 versions, for legal reasons or whatnot, they may make use of this API to delete any older versions, apply a label, and then archive the content. There may be other use cases but that jumps out as a one possibility making use of native Confluence features vs a 3rd party add-on.
Edit - Or as you mention, needing to remove a password/passphrase/api key from a page and its history.
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.