Get list of pages with number of versions

Pavel Potcheptsov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2017

For example:

  1.  Page One - 100 versions.
  2.  Page Two - 500 versions.
  3.  Some Other Page - 3 versions.

It will be also good to have direct links to pages and sort pages in descending order (from high number of versions to low).

  1.  Page Two - 500 versions - link.
  2. Page one - 100 versions - link.
  3.  etc

 

2 answers

0 votes
WW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 27, 2022

You can pull the page version numbers with the Confluence REST API, if you're up for it, with something like this:

http://example.com/confluence/rest/api/content?spaceKey=TST&expand=space,version

Just swap out your space key for TST and, of course, the first part of the URI with your Confluence instance.

You can even put the URI into a browser to get the results. Some browsers, like Firefox, will automatically parse the Json that's returned. Otherwise, you'd need to parse the data or search on "version" to get the results.

To display this in a Confluence page, you'd need to do some heavier coding, though.

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2017

Hi Pavel, currently it's not possible to obtain that information. Page history is not cached, so it would need to retrieve this data from the database everytime you call for it. You can submit a Feature request for this, but at the moment this operation wouldn't be recommended as it would cause a high load for the database.

Regards,

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events