@@ -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
+ url = "/api/v2/whiteboards"
2888
+ data = {"spaceId" : spaceId }
2889
+ if title is not None :
2890
+ data ["title" ] = title
2891
+ if parentId is not None :
2892
+ data ["parentId" ] = parentId
2893
+ return self .post (url , data = data )
2894
+
2895
+ def get_whiteboard (self , whiteboard_id ):
2896
+ try :
2897
+ url = f"/api/v2/whiteboards/{ whiteboard_id } "
2898
+ return self .get (url )
2899
+ except HTTPError as e :
2900
+ # Default 404 error handling is ambiguous
2901
+ if e .response .status_code == 404 :
2902
+ raise ApiValueError (
2903
+ "Whiteboard not found. Check confluence instance url and/or if whiteboard id exists" , reason = e
2904
+ )
2905
+
2906
+ raise
2907
+
2908
+ def delete_whiteboard (self , whiteboard_id ):
2909
+ try :
2910
+ url = f"/api/v2/whiteboards/{ whiteboard_id } "
2911
+ return self .delete (url )
2912
+ except HTTPError as e :
2913
+ # # Default 404 error handling is ambiguous
2914
+ if e .response .status_code == 404 :
2915
+ raise ApiValueError (
2916
+ "Whiteboard not found. Check confluence instance url and/or if whiteboard id exists" , reason = e
2917
+ )
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