Hello everyone.
I'm trying to delete a user from request participants via res api.
i found this:
https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-issueIdOrKey-participant-delete
and is the same as the add participant but changing post to delete.
My code is:
def requestParticipantsSD = "customfield_10023"
def userSD = issueToUpdate.fields[requestParticipantsSD].accountId
userSD.each { user ->
def bodyData = '{"accountIds": ["'+user+'"]}';
def resp = delete("rest/servicedeskapi/request/"+issuekey+"/participant")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body(bodyData).asJson()
}
and is returning me an error 500: No content to map due to end-of-input
im doing the same but changing delete to post, and returns 200 and the participant is added.
Any ideas?
Thanks you!