It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can i get the page version using a specific page id?

I am using a bash script to update a specific confluence page. In order to actually make the update, I need to retrieve the current page version. I have tried to do this using this command:

curl -X GET "https://<site>/rest/api/content/pageID?=version"

But this doesn't return the version only, it returns a lot of other stuff that is not useful to me? What is the easiest way to retrieve a version of the page? I am new to using confluence so if I am making a newbie mistake, please let me know.


1 answer

1 vote
Shawn C Atlassian Team Sep 25, 2018

Hi Asam, 

The Confluence API can provide the full JSON of the page you're viewing and cannot pull just the value corresponding to the Number of Versions on the page.  

If you're looking at updating a page in Confluence, you might want to query the endpoint:


This would provide you with the necessary Body Content (storage) of the page and the version number (to be incremented) to be used in the Data Payload when using PUT to update the page


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

227 views 3 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you