Removing user from a group using crowd REST API

Ganesh Gembali March 19, 2012

Hi,

I want to user crowd REST API to remove a user from a group. As per documentation I tried following command

curl -u jira:password -X DELETE -k https://mpcrowd-test.corp.ebay.com/rest/usermanagement/1/group/user/direct?username=ggembali&groupname=jira-users

Then I got this message : <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><reason>ILLEGAL_ARGUMENT</reason><message>name argument cannot be null</message></error>

I tried another format

curl -u jira:password -X DELETE -k  -d '{"name":"jira-users"}'  https://mpcrowd-test.corp.ebay.com/rest/usermanagement/1/group/user/direct?username=ggembali

Then I got this message

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code></status>

Can anyone tell me what I am doing wrong.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Nicolas Esteves
Contributor
July 4, 2017

Hi,

You should try this:

curl -D- -k -u "login:password" -X DELETE "https://myinstance/crowd/rest/usermanagement/latest/user/group/direct?username=user&groupname=group"

Worked for me on Crowd 2.7 (from a Windows client).

Nicolas.

0 votes
Dave Thomas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 7, 2012
Try this:
curl -u jira:password -X DELETE -k https://mpcrowd-test.corp.ebay.com/rest/usermanagement/latest/user/group/direct?username=ggembali&amp;groupname=jira-users

TAGS
AUG Leaders

Atlassian Community Events