Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence Update Page Using REST API not working.

Anoosh Asgharzadeh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2022

I'm using CURL and following the example in the link below to update a confluence page using Confluence REST API but get an error in the response. I'm able to successfully perform other REST operations such as GET PAGE and UPLOAD ATTACHMENT.

 

https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/#update-a-page

 

Response:

* Mark bundle as not supporting multiuse
< HTTP/1.1 415 Unsupported Media Type

Command Syntax below (I have replaced actual values with uppercase text for some parameters)

 

curl -v -u ID@SITE:TOKEN -X PUT -H 'Accept:application/json' -H 'Content-Type:application/json'  -d '{"id":"NUMBER","type":"page","title":"SAMPLE","space":{"key":"XYZ"},"body":{"storage":{"value":"<p>This is the updated text for the SAMPLE</p>","representation":"storage"}},"version":{"number":2}}' "SITE_URL/wiki/rest/api/content/NUMBER"

Any help is appreciated. 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events