forked from atlassian-api/atlassian-python-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added examples + focs for confluence/get_space_export method
- Loading branch information
gkowalc
committed
Oct 15, 2024
1 parent
bc2a601
commit 03bd7d6
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from atlassian import Confluence | ||
|
||
# init the Confluence object | ||
host = "<cloud_instance_url/wiki>" | ||
username = "<user_email>" | ||
password = "<API_TOKEN>" | ||
confluence = Confluence( | ||
url=host, | ||
username=username, | ||
password=password, | ||
) | ||
space_key = "TEST" | ||
confluence.get_space_export(space_key=space_key, export_type="html") | ||
# This method should be used to trigger the space export action. | ||
# Provide `space_key` and `export_type` (html/pdf/xml/csv) as arguments. | ||
|
||
# It was tested on Confluence Cloud and might not work properly with Confluence on-prem. | ||
# (!) This is an experimental method that should be considered a workaround for the missing space export REST endpoint. | ||
# (!) The method might break if Atlassian implements changes to their space export front-end logic. | ||
|
||
# The while loop does not have an exit condition; it will run until the space export is completed. | ||
# It is possible that the space export progress might get stuck. It is up to the library user to handle this scenario. | ||
|
||
# Method returns the link to the space export file. | ||
# It is up to the library user to handle the file download action. |