Preventing unnecessary revisions with API and wiki markup


We have some legacy processes which update Confluence periodically using the XMLRPC API and wiki markup.

Previously, Confluence was "smart" about updates and if you stored a page over an existing one without changes, it would not create a new revision.

However, at some point, after the storage format changes, if using wiki markup, it would create a new revision even if there are no changes.

Due to our processes, this generates a sizable amount of unnecessary revisions which we fear might have an impact on performance (not to mention making reviewing a page's history unbearable and messing around with watches).

We patched our processes to fetch the page's existing content, convert our new content to storage format and compare both- if they match we don't update the page.

This works in some cases, but we've noticed that convert to storage format does not actually match what is actually stored in all cases and thus, for some page, we still create unnecessary revisions.

We've found a few transformations we can apply to minimize this, as it seems that Confluence is somehow normalizing storage format after converting from wiki markup, but this feels very hacky.

Is there an alternative way to prevent this problem? Unfortunately, converting our processes to not use wiki markup is a huge amount of work and we would like to avoid that.



1 answer

1 accepted

Accepted Answer
0 votes

Actually, the solution was much simpler in the end; just convert the markup to storage format using convertWikiToStorageFormat and then store the page with the v2 API, that seems to work.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 09, 2018 in Confluence

Introducing Praecipio Consulting, an Atlassian Solution Partner

Hey there Community!  My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they c...

404 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you