File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -3698,6 +3698,24 @@ def add_space_permissions(
36983698
36993699 return self .post (url , data = data , headers = self .experimental_headers )
37003700
3701+ def add_space_permission_json_rpc (self , space_key , user , permission ):
3702+ """
3703+ The JSON-RPC APIs for Confluence are provided here to help you browse and discover APIs you have access to.
3704+ JSON-RPC APIs operate differently than REST APIs.
3705+ To learn more about how to use these APIs,
3706+ please refer to the Confluence JSON-RPC documentation on Atlassian Developers.
3707+ """
3708+ if self .api_version == "cloud" or self .cloud :
3709+ return {}
3710+ url = "rpc/json-rpc/confluenceservice-v2"
3711+ data = {
3712+ "jsonrpc" : "2.0" ,
3713+ "method" : "addPermissionToSpace" ,
3714+ "id" : 9 ,
3715+ "params" : [permission , user , space_key ],
3716+ }
3717+ return self .post (url , data = data ).get ("result" ) or {}
3718+
37013719 def remove_space_permission (self , space_key , user , permission ):
37023720 """
37033721 The JSON-RPC APIs for Confluence are provided here to help you browse and discover APIs you have access to.
You can’t perform that action at this time.
0 commit comments