Forums

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

Can't get user groups with Rest API

Julia Nunes Pedrosa
Contributor
July 9, 2020

Hey guys, 

I am trying to get the list of groups an user is member of but for some reason it isn't expanding.

curl -u user:userpassword http://jira.url/rest/api/2/user?username=testuser&expand=groups

This is the answer I'm receiving:

[...]

"groups":{"size":14,"items":[]},
"applicationRoles":{"size":1,"items":[]},
"expand":"groups,applicationRoles"}

 

 

1 answer

1 accepted

1 vote
Answer accepted
Julia Nunes Pedrosa
Contributor
July 9, 2020

I just realized that for some reason my server is requiring the URL to be under quotation marks. Now it's working.

curl -u user:userpassword "http://jira.url/rest/api/2/user?username=testuser&expand=groups"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.1
TAGS
AUG Leaders

Atlassian Community Events