File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,9 @@ Get spaces info
240
240
# Get Space permissions set based on json-rpc call
241
241
confluence.get_space_permissions(space_key)
242
242
243
+ # Get Space export download url
244
+ confluence.get_space_export(space_key, export_type)
245
+
243
246
Users and Groups
244
247
----------------
245
248
Original file line number Diff line number Diff line change
1
+ from atlassian import Confluence
2
+
3
+ # init the Confluence object
4
+ host = "<cloud_instance_url/wiki>"
5
+ username = "<user_email>"
6
+ password = "<API_TOKEN>"
7
+ confluence = Confluence (
8
+ url = host ,
9
+ username = username ,
10
+ password = password ,
11
+ )
12
+ space_key = "TEST"
13
+ confluence .get_space_export (space_key = space_key , export_type = "html" )
14
+ # This method should be used to trigger the space export action.
15
+ # Provide `space_key` and `export_type` (html/pdf/xml/csv) as arguments.
16
+
17
+ # It was tested on Confluence Cloud and might not work properly with Confluence on-prem.
18
+ # (!) This is an experimental method that should be considered a workaround for the missing space export REST endpoint.
19
+ # (!) The method might break if Atlassian implements changes to their space export front-end logic.
20
+
21
+ # The while loop does not have an exit condition; it will run until the space export is completed.
22
+ # It is possible that the space export progress might get stuck. It is up to the library user to handle this scenario.
23
+
24
+ # Method returns the link to the space export file.
25
+ # It is up to the library user to handle the file download action.
You can’t perform that action at this time.
0 commit comments