Wiki

Clone wiki

confluence-purge-pageversions-plugin / Home

passing.png

Welcome! Purge Page Version History for Confluence Documentation

Confluence tracks the history of changes to each page by creating a new version of the page each time it's modified. Over the time version history might go beyond than expected due to automated API changes by users. You can purge page version summary by keeping last few versions using this plugin either automatically or on-demand basis.

Gadget to display Page version summary in Space:

gadget1.PNG

Note. If you have more than 10K pages in Space, you might see slow in rendering summary content on page, At bottom please find the REST API to output summary metric to CSV file.

gadget2.PNG

Go to Page, Click ... > Purge Versions

purge_page_version0.PNG

REST API

GET http://localhost:8090/rest/purgepageversions/1.0/utility/list/page/version/summary/page/id/{pageId}

GET http://localhost:8090/rest/purgepageversions/1.0/utility/list/page/version/summary/space/key/{spaceKey}

GET http://localhost:8090/rest/purgepageversions/1.0/utility/csv/page/version/summary/space/key/{spaceKey}

Please use this example if you have more than 10K pages in Space

$ curl -u"user:pass" -XGET \
http://localhost:8090/rest/purgepageversions/1.0/utility/csv/page/version/summary/space/key/DT \
 | tee Dt_page_version_summary.csv

DELETE http://localhost:8090/rest/purgepageversions/1.0/utility/purge/page/version/summary/page/id/{pageId}/retain/{retain}

DELETE http://localhost:8090/rest/purgepageversions/1.0/utility/purge/page/version/summary/space/key/{spaceKey}/retain/{retain}/updated/{lastDays}

DELETE http://localhost:8090/rest/purgepageversions/1.0/utility/purge/page/version/summary/all/spaces/retain/{retain}/updated/{lastDays}

Updated