How to PUT new data to certain page

krzychus April 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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 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
sandeep August 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. 

0 votes
krzychus April 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 *******  "}

TAGS
AUG Leaders

Atlassian Community Events