Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Why I can not update a specific confluence page content by rest api?

{
"id" : "xxxxxxx",
"type" : "page",
"title" : "xxxxxxxxx",
"body":
{
"value" : "<p><table><tr><th>head1</th><th>head2</th></tr><tr><td>value1</td><td>value2</td></tr><tr><td>value3</td><td>value4</td></tr></table></p>",
"representation" : "storage"
},
"version" : {
"number" : 2
}
}

 

I use json data like above(id and title have been insert  ),and also use "PUT" method.

The title of that page can be modified but the value is still unchanging.

Why does this happen?

Is the value unchanging in confluence page when i use rest api to call it?

Thanks for answering me!!!!

1 answer

0 votes

Hello,

Your JSON data looks to be in a good format. Since you are reporting the page title is being update but not the body then it seems like there may be an issue with the entry URI. 

What is the URI you are using to update content of an existing page? An example of this would be:

http://localhost:9999/confluence/rest/api/content/2149384202

Along with this, what is the response code you are getting from the API call?

It should be 200, 400, or 404.

Something else to keep in mind, your version must increment up from the previous update each time the call is made. The page version is dictated from Confluence and cannot be manually modified from what Confluence is reporting.

Further information on the Update Content calls can be found in the Confluence REST API Documentation (Content update)

We look forward to your response to get this issue resolved!

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

109 views 1 0
View question

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