Use-Case: I would like to pull the HTML body-content from different "versions" of the same confluence page for comparison.
This is to associate the individual who made a specific change said Confluence-page.
Using the Confluence API "Get content version":
https://developer.atlassian.com/cloud/confluence/rest/#api-api-content-id-version-versionNumber-get
I am able to get all the historical information that I need (Updated by {username}, Date-Time of update, etc), EXCEPT the actual content / body (unless I'm missing it somewhere in one of the expanded sub-branches).
Via the regular Confluence WebUI, you can actually see all the page version, for example:
https://You_Company_Name.atlassian.net/wiki/pages/viewpage.action?pageId=123456789&pageVersion=21
> but hoping there's a way to pull this HTML body down via the API
Searching around, there is mention in older versions of Confluence API pulling the content using the flag:
Status=historical
Here are some folks that have mentioned using the API with this flag:
===
2)
===
But on the Confluence API site, when reading through the suggesting parameters for "Get content":
https://developer.atlassian.com/cloud/confluence/rest/#api-api-content-get
... It mentions that:
"... Note, the historical
status is currently not supported..."
Does anyone know a way to pull the HTML body of historical versions of a Confluence page using the API?
Hi everyone, I was able to find the API call where I can grab the HTML of previous versions, and compare to current version:
Previous version(s):
https://YOU_COMPANY_NAME.atlassian.net/wiki/rest/api/content/{page id}/version/{version number}?limit=10&expand=collaborators,content.body.storage
Which I can compare to the current version by calling:
https://YOU_COMPANY_NAME.atlassian.net/wiki/rest/api/content?title={YOU_PAGE_NAME}&expand=body.storage,version
from where I pullout the [value] field from each JSON payload responses.
Hope this helps folks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.