I want to post .html file to confluence page that I have created earlier via REST API. I have tried this using this PUT command with the following URL:
PUT https://<confluence page>/rest/api/content/<pageID>?expand=body.storage
This works well when I am posting normal string content to the page, but does not work when I tried to post .html file to the page.
How can I post .html file to confluence page? Which API endpoint should I use?
You can't POST arbitrary HTML into a Confluence page because Confluence is not storing its pages in HTML but their own storage format. See my answer in the thread Create macro via REST API for more details.
If you instead mean to upload the HTML file as an attachment you should use the attachment REST API.
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events