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.
Community moderators have prevented the ability to post new answers.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.