Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

195 views 6 7
Read article

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