Using the Confluence REST API to find all versions in page history

Tom Turbo July 3, 2014

Hi,

I'm using the Confluence REST API to try and get a list of all versions in the page history, but the REST API does not seem to cover this use case.

The following query does not provide enough information:

rest/api/content/1234/history

The relevant information is restricted to only:

previousVersion: {
    when: "2014-06-01T12:03:00.733+0100",
    number: 45,
    message: "",
},

Is there a way to see all versions of a page history, including the accompanying save message a user can enter?

And how can "number" from the code sample be useful, as the REST API doesn't seem able to process it any further?

I'd rather not go and parse the HTML of viewpreviousversions.action but would prefer to use the REST API for this.

Ideally, the REST API would give me this:

previousVersions: [
   {
        number = 45,
        message = "Foobar",
        pageId = 7412738
   },
   {
        number = 44,
        message = "Hello",
        pageId = 2347899
   },
   etc...
]

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Ron Elazar October 18, 2017
Juan Serrano June 18, 2019

Is this under experimental because this is a non-official API? Is it going to be official anytime soon? We're looking into using it. 

0 votes
Alex August 4, 2015

Did you find a workaround?

TAGS
AUG Leaders

Atlassian Community Events