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

Achyuth Nagaraj Balasubramanian August 9, 2017

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
TAGS
AUG Leaders

Atlassian Community Events