Hi, currently I have a yaml format code block on a confluence page, I'm trying to update this as part of a python project using the confluence python api, so far I've been using
confluence.get_page_by_id
and then
page_content =page['body']['storage']['value'], and then inserting the new data and using
confluence.update_existing_page
to attempt to update the page, however the page doesn't update but the api call doesn't throw out any messages about failure/ If I update the page_title that gets updated, just not the information in the page macro. Is there a different way I'm meant to go about updating data contained within macros?
Thanks
Hi @Harry
No I think your way is the way to go. You have to push the entire page content using the API. Note that is you push everytime the same content for test, Confluence will notice that there is no difference and will not update the page/create entry in the page history.
Also make sure that you escape all special characters.
I tried it in the past but never success to do the same thing but with JSON content not python. I end up creating a user macro that was decoding base64 and pushed my content encoded in base64 to avoid any issues with special characters.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.