Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleParameters

The service provides the following parameters to control the histories to be cleaned.

Section
titlespaceKeys

The list of comma-separate keys to the space to remove the history of their pages. If not specified, all spaces are traversed.


The pattern to match for version comments. Versions that match this pattern are preserver, that is: not removed.

projectdoc-section
titlekeepCount

The number of page versions to keep, 1 (default) meaning that only the current version is kept.

Accepted values are larger than zero.

Section
titlepreservePattern
Caution Box
titleDanger of loosing Versions!

Please note that any versions that do not match are removed. This includes versions whose comments are misspelled.

The preserve pattern is applied to all page versions that are taken into consideration. That is the versions saved with the keepCount are preserved whether they match this pattern or not.

Example Box

Assume that important versions have a comment that starts with [important]. If you want to preserve this versions, use the following regular expression.

Code Block
languagetext
^\[important\].*$

Note that for this example versions with the following comments will be removed, since they do not match the example expression.

  • important: My very special version
  • [important - this is important!
  • important change
Section
titleremoveAttachments

Controls whether or not the attachments of versions that are not removed should also be cleaned.

If checked previous versions of attachments to pages are also removed.

transclusion-macro
taget-heading-level*
documentRemove History
idskeepCount


Transclusion
taget-heading-level*
documentRemove History
idspreservePattern


Transclusion
taget-heading-level*
documentRemove History
idsremoveAttachments


The number of attachment versions to keep, 1 (default) meaning that only the current version is kept.
Transclusion
taget-heading-level*
documentRemove History
idsattachmentKeepCount
Section
titleattachmentKeepCount



Section
titleResponse

The response on a successful call is 202 with a Location header information to find the started long running task.

Example Box

A location value is a link to the REST service providing access to the long running task.

Code Block
languagetext
http://localhost:1990/confluence/rest/api/longtask/6e19ce1e-9671-4953-bd1d-a915a15b1a57


If a space key does not point to a space or a space is not accessible for the user starting the service, this space key is skipped.

The response returns a 500 on any internal error.

...