The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how do i obtain previous version page id?

Timor Noa Levi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2019

Hi,

i want to catch previous versions page id with using the current version page id using the script console. is that possible?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2019

Hello there Timor!

Could you clarify a few things about the script console:

  1. Are you referring to the Adaptavist ScriptRunner Macro?
  2. Are you facing any kind of issue when trying to fetch this information?

Nonetheless, we can achieve this by using Confluence REST API as well! We can do it like this:

  1. Go to your favorite browser
  2. Enter the following string in the address bar:
http://yourinstance.address/rest/experimental/content/<pageID>/version?expand=content

You should change the yourinstance.address to your actual instance address. Also, the <pageID> should be replaced by the page id of the current page page_id. This REST call should retrieve the necessary information for all page versions.

You can also send this with a cURL from your terminal, if using Linux or macOS. If you are on Windows, you will need some extra software:

Run cURL commands from Windows Console

Further, you will need to check the content tab that shows up when the query is ran in your browser. When you reach that, you can look at the webui line. The URL shown there should contain your page_id.

Looking forward to your reply!

TAGS
AUG Leaders

Atlassian Community Events