We have several automation scripts that run every day and generate confluence pages with various data.
What is the best way to avoid having a new page history version in case nothing has changed on the page when the script run?
So probably what I need is the option to simulate how the confluence HTML code would look like when the processed content is published and compare it with the existing one grabbed from the confluence page?
PS: I need an API approach because of the automation
PPS: Why Confluence creates a new page history version even though nothing has changed? Can this behavior be modified?
Hello @Ondrej Šebela ,
Not sure what OOB scripts of Confluence you use as usually it is up to you to control when and if you create the new version of the page.
You can just compare the body of the page before and after and if they are equal - not to create new version of the page. I suppose you can control your script and trigger changes only after comparison.
>>> PPS: Why Confluence creates a new page history version even though nothing has changed? Can this behavior be modified?
Please clarify what script you mean ?
So you mean retrieving current page content via:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please elaborate on what and how this script works in general?
So, if you have some HTML data from other source and when you get it you just get the BODY ('view' representation) of the page via REST API (in your example .NET/C#/PShell, I suppose) and compare the String of the page body and the String of the HTML you have. If they are equal , you do not create new version of the page by updating it (HTTP 'PUT').
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have several generated confluence pages, but in general, I grab some data (like Active Directory groups), convert them to HTML via the official PowerShell command ConvertTo-ConfluenceStorageFormat which returns HTML string
So I guess I should compare it to the HTML retrieved via GET webrequest mentioned in previous post right?
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.