atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

CONFLUENCE: Retrieve all previous page versions with API call

Open NoudF opened this issue 4 years ago • 1 comments

with the original REST API, it is possible to retrieve all previous versions using the following call:

{base URL}/rest/api/content/{id}/version/

Is it possible to get this functionality in the library as well, such that we can retrieve all previous page versions in a list with one call, by, for example, allow for the following call:

confluence.get_page_by_id('12345678', version = '-')

This way the revision history can be obtained without having to loop over all version numbers to retrieve the results and store the results in a list.

For a page with more than 100 versions, this reduces the number of required API calls drastically.

NoudF avatar Jul 19 '21 10:07 NoudF

You can (mis-)use get_attachment_history() for this. Just pass the page_id and it will return all versions.

zapp42 avatar Nov 23 '23 08:11 zapp42