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

0 votes
Accepted answer

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
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

912 views 45 7
Join discussion

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