Updating a page via REST API does not work

Luka Simon Thies February 7, 2025

Hey there

I want to update a page with the REST API. 
Currently, I use a GET to collect the current data of the page, then change the body and version number and try to use a PUT to update the page.

What intrigues me is that I can update the Title of the page, but nothing inside the body.

In my tests I used a curl like this:

curl -u email:api_token -X PUT -H "Content-Type: application/json" https://XXX.atlassian.net/wiki/rest/api/content/<ID>?expand=body.storage -d @Data_file


But if someone has a python solution, that would also be appreciated

1 answer

1 accepted

3 votes
Answer accepted
Luka Simon Thies February 7, 2025

I just solved my own error :D

While I updated the "represenation" to "storage", I left the body still as "view".

 

After changing that to "storage" as well, the page was updated successfully

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events