How to get changes in page history via REST API

Jack_Moore March 16, 2020

Hi,

 

I'm currently monitoring Confluence activity via the rest API.  I am able to collect dates, users, and page ids of all activity with a specific date range.  In addition to this, I need to pull the changes made to a page related to that activity.

Current I'm able to pull both the HTML of the new version as a result of the change and the HTML of the previous version via the below API call.

rest/api/content/search?expand=body.view,history.previousVersion.content.body.view&start=0&limit=25&cql=<dateRangeCQL>

Using this information, I could design a Python script using difflib that could decipher the differences in the HTML, but this is too computationally expensive to run on many large confluence pages.

On the Confluence web application, there's a page to view the difference between two versions via this link: pages/diffpagesbyversion.action.  This page highlights the additions and reductions in the page.

Given that this information is available via the web application, I was wondering if there was an API call to pull just the difference between two versions?  

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2023

Hi @Jack_Moore ,

unfortunately there's not a specific REST API to retrieve that information. You can retrieve specific content version and then compare json (https://community.atlassian.com/t5/Confluence-questions/Confluence-API-get-page-content-from-historical-versions/qaq-p/1398857)

Fabio

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events