@@ -2877,6 +2877,47 @@ def audit(
2877
2877
params ["searchString" ] = search_string
2878
2878
return self .get (url , params = params )
2879
2879
2880
+ """
2881
+ ##############################################################################################
2882
+ # Confluence whiteboards (cloud only!) #
2883
+ ##############################################################################################
2884
+ """
2885
+
2886
+ def create_whiteboard (self , spaceId , title = None , parentId = None ):
2887
+ # Use spaceId, not space key.
2888
+ url = '/api/v2/whiteboards'
2889
+ data = {"spaceId" : spaceId }
2890
+ if title is not None :
2891
+ data ["title" ] = title
2892
+ if parentId is not None :
2893
+ data ["parentId" ] = parentId
2894
+ return self .post (url , data = data )
2895
+
2896
+ def get_whiteboard (self , whiteboard_id ):
2897
+ try :
2898
+ url = f'/api/v2/whiteboards/{ whiteboard_id } '
2899
+ return self .get (url )
2900
+ except HTTPError as e :
2901
+ # Default 404 error handling is ambiguous
2902
+ if e .response .status_code == 404 :
2903
+ raise ApiValueError ("Whiteboard not found. Check confluence instance url and/or if whiteboard id exists" , reason = e )
2904
+
2905
+ raise
2906
+
2907
+
2908
+ def delete_whiteboard (self , whiteboard_id ):
2909
+ # Deleting a whiteboard moves the whiteboard to the trash, where it can be restored later
2910
+ try :
2911
+ url = f'/api/v2/whiteboards/{ whiteboard_id } '
2912
+ return self .delete (url )
2913
+ except HTTPError as e :
2914
+ # # Default 404 error handling is ambiguous
2915
+ if e .response .status_code == 404 :
2916
+ raise ApiValueError (
2917
+ "Whiteboard not found. Check confluence instance url and/or if whiteboard id exists" , reason = e )
2918
+
2919
+ raise
2920
+
2880
2921
"""
2881
2922
##############################################################################################
2882
2923
# Team Calendars REST API implements (https://jira.atlassian.com/browse/CONFSERVER-51003) #
0 commit comments