View Page Source of a Version of the Page

Rob Dempsey April 28, 2021

Hi

I have been using the Confluence API to view the source code of a page

<confluence-url>/plugins/viewsource/viewpagesrc.action?pageId=<pageId>

What I need is to view a version of that page.  I was hoping that

<confluence-url>/plugins/viewsource/viewpagesrc.action?pageId=<pageId>&pageVersion=70

This only showed the source of the latest page and not the version 70

I tried through confluence and selecting page history and clicking version

https://myesure.atlassian.net/wiki/pages/viewpage.action?pageId=2681897831&pageVersion=70

And from the options selected "View Source".  Choosing that option show the correct source

????

Does anyone know of a method to do this?

Rob

 

2 answers

0 votes
Helen Setchell March 6, 2022

I know this is a bit old, but was looking for similar. I think if you use

<confluence-url>/plugins/viewsource/viewpagesrc.action?pageId=<pageId>

with the version ID where the pageID should go, it may work.

How I arrived at this:
When in the version you want, right-click the 'View source' link and 'Copy link address'

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2021

Hello Rob,

Thank you for raising this on Atlassian Community! I found a thread from earlier last year that might help you:

Take a look and see if the suggestions work for you. If you still have trouble, I recommend using our Atlassian Developer Community instead. The folks there are more familiar with the REST-API and developing for Atlassian Products, so they may be able to help you.

Take care,

Shannon

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events