I'm using the REST API to create a program that takes pages stored locally and uploads them into Confluence. I'm having issues if the page contains picture. So far, how I do it is: 1. create an empty page, and get the pageID. Then, make a post request to attach the picture to that page id. And thirdly, I'm updating the page with the layout I want (in xml). The last part fails, if I include the <ac:image> tag, returning a 500 internal error.
<ac:image ac:height="55"><ri:attachment ri:filename="image.png"/></ac:image>
That's the tag I'm using to upload the image. The request works without it and changes the page just fine.