I would like to import some page from html to confluence, this work well with the REST API
{"type":"page","title":"test3",
"space":{"key":"DM"},"body":{"storage":{"value":"<somehtml>"
But how could I add on top of that a Table of Contents macro ?
I'd also recommend using this python module: atlassian-python-api (https://github.com/atlassian-api/atlassian-python-api)
Following example (https://github.com/atlassian-api/atlassian-python-api/blob/master/examples/confluence-page-update.py) demostrates updating of the page by using the specified API. I am citing the sample here:
You can check the implemenation of update_page method here (https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/confluence.py).
Hope this helps. Would be nice to hear back if it helped.
You can get an example of updating a confluence page is this article.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'd have to contatenate content of your destination page and HTML table layout that you are about to add. When using PUT method on https://example.net/confluence_instance/plugins/servlet/restbrowser#/resource/api-content-id-label API, the target page specified in contentId is overwritten by the content you place in request body.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.