diff --git a/docs/confluence.rst b/docs/confluence.rst index 11ce8ea42..1a76de071 100644 --- a/docs/confluence.rst +++ b/docs/confluence.rst @@ -240,6 +240,9 @@ Get spaces info # Get Space permissions set based on json-rpc call confluence.get_space_permissions(space_key) + # Get Space export download url + confluence.get_space_export(space_key, export_type) + Users and Groups ---------------- diff --git a/examples/confluence/confluence_get_space_export.py b/examples/confluence/confluence_get_space_export.py new file mode 100644 index 000000000..4dfa98fcf --- /dev/null +++ b/examples/confluence/confluence_get_space_export.py @@ -0,0 +1,25 @@ +from atlassian import Confluence + +# init the Confluence object +host = "" +username = "" +password = "" +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.