atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

Export page not working #1409

Open aguckenber-chwy opened 3 weeks ago

aguckenber-chwy commented 3 weeks ago

Has anyone tested this recently?

https://github.com/atlassian-api/atlassian-python-api/blob/master/examples/confluence/confluence_export_page.py

    confluence = Confluence(
        url='https://chewyinc.atlassian.net/',
        username='<<user>>',
        password='<<password>>',
        api_version='cloud',
    )
    # ...
    content = confluence.export_page(page_id)

When I run the code, it errors out with an invalid path.

image

If I remove api_version='cloud' then the call works but the PDF returned is invalid/corrupt and can't be opened.

aguckenber-chwy commented 3 weeks ago

Update:

Not specifying the api_version returns the HTML of the exporter page not the PDF. Setting the cloud completely breaks the flow and errors out.