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 to PUT new data to certain page

szkl Apr 28, 2015

Hello ,
 

Currently I'm working on the update functions in my system. Wbhat I'm trying to do is PUT new data to certain page in confluence. I'm doing this via the PUT API function: https://developer.atlassian.com/confdev/confluence-rest-api/confluence-rest-api-examples#ConfluenceRESTAPIExamples-Updateapage  I'm using C# to do this. I'm getting some weird errors like {"statusCode":409,"message":"You're using an invalid version of the updated content. The latest version is 3"}

 

Can someone please tell me how this should be done?

Thank you,

3 answers

1 accepted

1 vote
Answer accepted
Stephen Deutsch Apr 28, 2015

It seems like you need to update the version number before putting a new version of the page.  Just add 1 to the version number before trying to submit.

0 votes
szkl Apr 28, 2015

This is what I received:{"statusCode":500,"message":"java.lang.NullPointerException: null"}

And anyway...what if I have to different pages with ID's: 11112 and 11113... then also I should add "1" ? that doesn't seems like a good approach :/

 

 

 

Also when I change the JSON this is what I'm getting:

{"statusCode":403,"message":"Could not update Content of type : class com.atlassian.confluence.pages.Page with id *******  "}

0 votes
sandeep Aug 18, 2016

@Iván SZKIBA Were you able to find the soulution for this. I am facing the same situation right now. Can you please update the answer here. 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase

Friday Fun: What's your best vacation planning hack?

Let's face it, work can be challenging but fulfilling, especially when you enjoy the challenges thrown at you.  However for me, nothing compares to going on vacation (or holiday as some of you m...

540 views 26 4
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