I'm trying to export to PDF a page without knowing its page ID via REST API or the Atlassian Python API.
I only have its URL. Here's an example of the URL:
https://my-product.atlassian.net/wiki/spaces/MY-SPACE-NAME/overview
As I only have the URL, without knowing its page ID, I tried understanding how such export can work, and for now it doesn't seem promising.
I've noticed that when I try to get the space's content, the page I'm looking for is returned. In fact, on this page's _links attribute, there's another attribute called webui whose value is /spaces/MY-SPACE-NAME/overview (in addition to the self page attribute, that returns the actual link of the page https://my-product.atlassian.net/wiki/rest/api/content/PAGE-ID).
Other than getting the space's entire content and start looking for the webui attribute that matches the URL I'm looking for, is there a better option to export the page to PDF?
Thanks everyone in advance!
Welcome to the community.
There is no option to export page or space to PDF, Word or HTML via the API.
Al long running open issue at Atlassian can be found here: https://jira.atlassian.com/browse/CONFCLOUD-37995
You can vote for this, but I don't see this option comming soon
Thank you Marc, good to know.
I managed though to export a page to PDF with its ID via the Atlassian Python API package. Do you happen to know how the above can be achieved with it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry now, as these packages are not Atlassian owned.
I do see this python option in
# Export page as PDF # api_version needs to be set to 'cloud' when exporting from Confluence Cloud . confluence.export_page(page_id)
As I'm not well evolved in python, II'm afraid I can't help you further on this.
I got the information from here: https://atlassian-python-api.readthedocs.io/confluence.html#page-actions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sapir Ben Baz what you can do is get a list of page IDs from the space, then loop through them for each one. Or you can loop though them and find the one you want. The issue I am having is getting it to get all the data with it such as images.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.