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
Hey Julian,
thank you, helped me a lot.
Marek
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.