we are using the draw.io confluence plug in for our wiki, and we are finishing our own (XML draw.io) network templates, which we wanna embed into the existing confluence page. The problem is, we don't know how to do that, as the simple attach call (API) will not work.
That would be tricky. Xml attachment is one part of the story. Png is the second. Each time you save a diagram a png is generated which is displayed in the page editor.
Aside from adding attachments through rest calls, you would also need to add the macros to pages. Both can be done programmatically but you would need to make your own plugin to do that.