Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is fetching of previous versions of a wiki page really not implemented in the Confluence API?

ZachE February 4, 2016

When I try to use the "version=N" URL parameter to use the Confluence API to fetch previous versions of a page I get a 501 Not Implemented. Really?

I'm formatting my URL like this:

https://MYSERVER/rest/api/content/24564280?version=10

I'm getting a result like this: 

HTTP/1.1 501 Not Implemented
Cache-Control: no-cache, must-revalidate
Connection: close
Date: Thu, 04 Feb 2016 20:30:48 GMT
Server: Apache/2.4.7 (Ubuntu)
Content-Type: application/json
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Client-Date: Thu, 04 Feb 2016 20:30:47 GMT
[SSL Headers elided]
X-AUSERNAME: pmscripts
X-Content-Type-Options: nosniff
X-Seraph-LoginReason: OK

{"statusCode":501}

Why document the parameter if it's not implemented? 

https://docs.atlassian.com/atlassian-confluence/REST/5.9.4/#d3e1163

Am I using the parameter incorrectly? Does this work for anyone else? I couldn't find a bug report about it which seems odd given that this seems like core functionality...I'll file a JIRA issue if it is really not implemented and there isn't one already...

I'm using Confluence 5.9.4.

 

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Stephen Deutsch
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.
February 10, 2016

I'm not sure why later versions of Confluence throw a 501, earlier versions throw a 400 with a helpful error message...

Anyways, the answer to your question is that of course the API supports getting older versions, but you have to include "status=historical" in your request, so it would look like this:

https://MYSERVER/rest/api/content/24564280?status=historical&version=10

Hope that helps!

ZachE February 10, 2016

That worked! Thank you!

ZachE February 10, 2016

I posted https://jira.atlassian.com/browse/CONF-40743 to request the documentation be updated.

TAGS
AUG Leaders

Atlassian Community Events