Hello. I need a help in the confluence rest API calls. I want to update my confluence page via curl. Edited

When I tried to delete and add attachments, I am able to do it but create and update is not working. The sample request I am giving is the following,

 

CURL.EXE -k -u admin:admin -X PUT -H 'Content-Type:application/json' -d'{"id":"28607879","type":"page","title":"new page","space":{"key":"TPNET"},"body":{"storage":"value":"<p>This is the updated text for the new page</p>","representation":"storage"}},"version":{"number":2}}' https://xyz.com/rest/api/content/28607879

The response I get is nothing, it just says no error and at the same time it doesnt update the page also. The same with create. But I am able to get the json using the url I specify in the request. Please help me with the issue. I also tried to include a prefix \ before each of my " but then too I just don't get any response and error. It's just coming outta the request with nothing. 

0 answers

Suggest an answer

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

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

510 views 7 6
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you