@@ -187,7 +187,7 @@ def get_request_participants(self, issue_id_or_key, start=0, limit=50):
187
187
return response
188
188
return (response or {}).get ("values" )
189
189
190
- def add_request_participants (self , issue_id_or_key , users_list ):
190
+ def add_request_participants (self , issue_id_or_key , users_list = None , account_list = None ):
191
191
"""
192
192
Add users as participants to an existing customer request
193
193
The calling user must have permission to manage participants for this customer request
@@ -197,11 +197,15 @@ def add_request_participants(self, issue_id_or_key, users_list):
197
197
:return:
198
198
"""
199
199
url = "rest/servicedeskapi/request/{}/participant" .format (issue_id_or_key )
200
- data = {"usernames" : users_list }
200
+ data = {}
201
+ if users_list is not None :
202
+ data ["usernames" ] = users_list
203
+ if account_list is not None :
204
+ data ["accountIds" ] = account_list
201
205
202
206
return self .post (url , data = data , headers = self .experimental_headers )
203
207
204
- def remove_request_participants (self , issue_id_or_key , users_list ):
208
+ def remove_request_participants (self , issue_id_or_key , users_list = None , account_list = None ):
205
209
"""
206
210
Remove participants from an existing customer request
207
211
The calling user must have permission to manage participants for this customer request
@@ -211,7 +215,11 @@ def remove_request_participants(self, issue_id_or_key, users_list):
211
215
:return:
212
216
"""
213
217
url = "rest/servicedeskapi/request/{}/participant" .format (issue_id_or_key )
214
- data = {"usernames" : users_list }
218
+ data = {}
219
+ if users_list is not None :
220
+ data ["usernames" ] = users_list
221
+ if account_list is not None :
222
+ data ["accountIds" ] = account_list
215
223
216
224
return self .delete (url , data = data , headers = self .experimental_headers )
217
225
0 commit comments