Hi,
I have a question concerning return value of API call mentioned above. Documentation example https://docs.atlassian.com/jira/REST/latest/#d2e4021 :
{ "self": "http://www.example.com/jira/rest/api/2/user?username=fred", "name": "fred", "emailAddress": "fred@example.com", "avatarUrls": { "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred", "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred", "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred", "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred" }, "displayName": "Fred F. User", "active": true, "timeZone": "Australia/Sydney", "groups": { "size": 3, "items": [] } }
Am trying to find to which groups the user belongs to. However there doesnt seem to be any groups visible in "groups" section ("items" list is empty) in spite of the fact that "size" is actually 3. Is this a bug or did I just misunderstood something ?
I could also perform following call https://docs.atlassian.com/jira/REST/latest/#d2e2010 but it needs admin permission which doesnt seem safe in our environment since the task will be automatic.
Thanks in advanced Marek
Hey Marek,
to get the the groups you have to add an extra parameter like in following example call
/rest/api/2/user?username=yourUsername&expand=groups
Cheers Julian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
then fell free to accept my answer ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.