pythonconfluenceconfluence-rest-apiatlassian-python-api

How get context Confluence using atlassian-python-api?


I want to get context page confluence, used python module atlassian-python-api

https://github.com/AstroTech/atlassian-python-api

found example how to create new page

from atlassian import Confluence

confluence = Confluence(
    url='http://localhost:8090',
    username='admin',
    password='admin')

status = confluence.create_page(
    space='DEMO',
    title='This is the title',
    body='This is the body. You can use <strong>HTML tags</strong>!')

print(status)

How get context, example for this page http://conf01:8080/pages/viewpage.action?pageId=111113 ?


Solution

  • According to the example, you can either use get_page_by_title or get_page_by_id for getting page content.