atlassian-python-api
atlassian-python-api copied to clipboard
CONFLUENCE: Retrieve all previous page versions with API call
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.
You can (mis-)use get_attachment_history() for this. Just pass the page_id and it will return all versions.