Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API: The group name can not be empty

Matt Kimball November 5, 2021

Good Day!

I'm using Jira Server(v8.5.2) and I'm having an issue removing a user from a group via a Rest call.
I'm referencing the docs here https://docs.atlassian.com/software/jira/docs/api/REST/8.13.13/#group-removeUserFromGroup

Here is my call.


curl -D- -u "user:pass" -X DELETE -H "Content-Type: application/json" -d "{""groupname"": ""cmteam"",""username"": ""mkimball""}" "https://jira.abc.com:8443/rest/api/2/group/user"

Here is my response.


HTTP/1.1 400
X-AREQUESTID: 736x5839x1
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-ASEN: SEN-3227898
Set-Cookie: JSESSIONID=44D609176B08968E51ED9105B4; Path=/; Secure; HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=B5P1-XI0T-LAL0-AMZA_20a1cac882ea74e58ee4a82993c93_lin; Path=/; Secure
X-ASESSIONID: 1p7zli
X-AUSERNAME: user
Cache-Control: no-cache, no-store, no-transform
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 05 Nov 2021 17:16:03 GMT
Connection: close

{"errorMessages":["The group name can not be empty"],"errors":{}}

Why would I be getting this error when I'm supplying a group name? Is there something wrong with the way I am supplying json data? Any advice or suggestions would be greatly appreciated!

Thank you. 

1 answer

1 accepted

0 votes
Answer accepted
Support Team [Clearvision]
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.
November 8, 2021

Hi Matt

This endpoint requires the groupname and username as query parameters e.g.

https://jira.abc.com:8443/rest/api/2/group/user?groupname=cmteam&username=mkimball

 In your example you could do

curl -X "DELETE" -u username:password "https://jira.abc.com:8443/rest/api/2/group/user?groupname=cmteam&username=mkimball"

Worth testing this in a test environment first

Matt Kimball November 9, 2021

Thank you for the support! This was the issue exactly.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events