Insert Confluence / Wiki Markdown via API


I've seen however this is now 2 years old. 

I've developed something in Python to create a page in Confluence which works really well, but for simplicity here is an equivalent cURL example:

curl -u\
-H 'Content-Type: application/json' \
-d '{"type":"page","title":"new page","ancestors":[{"id":1337}],"space":{"key":"SPACEHERE"},"body":{"storage":{"value":"||Some Example||More Example|| ","representation":"storage"}}}' \

However instead of rendering a table using the supplied markdown it creates text.

I *can* perform the following manual steps to render the markdown as a table:

1. Edit newly created page
2. Insert Markdown 
3. Copy the markdown text and insert it

These manual steps anger me deeply however. 

Am I doing something wrong or does Confluence API not support Markdown ?

3 answers

You need to use "representation":"wiki" instead of "representation":"storage".

Once replaced, you JSON worked just fine (using Confluence 5.10.4 and tested with RestAPI Browser addon).

Thank you.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,082 views 2 13
Read article

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