Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-8082

SOAP should be able to find out what groups a user is a member of

    • Icon: Suggestion Suggestion
    • Resolution: Won't Fix
    • 4.2
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      From email
      ----------------------
      I'm working on a project and we'd like to more neatly integrate the
      application with our JIRA setup. We're attempting to use SOAP calls,
      but looking through the API I'm not finding everything we're looking
      for. We're trying to retrieve the groups that a user belongs to, but
      I can't seem to find something that will retrieve them. Failing that,
      I thought of the other approach of matching them via retrieving the
      users belonging to each particular group, but I can't find a function
      to retrieve all the groups.

            [JRASERVER-8082] SOAP should be able to find out what groups a user is a member of

            Hi,

            User group memberships are is available in the user resource from JIRA 4.2 onwards. Example:

            {
                "self": "http://www.example.com/jira/rest/api/2.0/user?username=fred",
                "name": "fred",
                "emailAddress": "fred@example.com",
                "avatarUrl": "http://example.com:8080/jira/secure/useravatar?size=large&ownerId=fred",
                "displayName": "Fred F. User",
                "groups": {
                    "size": 3,
                    "items": [
                        {
                            "name": "jira-user"
                        },
                        {
                            "name": "jira-admin"
                        },
                        {
                            "name": "important"
                        }
                    ]
                },
                "expand": "groups"
            }
            

            For a full reference of what is possible using this API, check out the REST API documentation. You may also like to read:

            If you're interested in knowing what's coming in JIRA 4.3, I suggest that you look at:

            If you encounter any issues with the REST API in JIRA 4.2 or any of the 4.3 EAP releases, feel free to report them (under the Remote API (REST) component). I am closing this issue, as there currently no plans to enhance the SOAP API.

            Thanks,
            Luis Miranda (Atlassian)

            Luis Miranda (Inactive) added a comment - Hi, User group memberships are is available in the user resource from JIRA 4.2 onwards. Example: { "self": "http://www.example.com/jira/rest/api/2.0/user?username=fred", "name": "fred", "emailAddress": "fred@example.com", "avatarUrl": "http://example.com:8080/jira/secure/useravatar?size=large&ownerId=fred", "displayName": "Fred F. User", "groups": { "size": 3, "items": [ { "name": "jira-user" }, { "name": "jira-admin" }, { "name": "important" } ] }, "expand": "groups" } For a full reference of what is possible using this API, check out the REST API documentation . You may also like to read: The JIRA REST API Tutorial , for a quick intro The JIRA REST Java Client , for tools that will allow you to get started on a Java client quickly If you're interested in knowing what's coming in JIRA 4.3, I suggest that you look at: Sneak peek: REST in JIRA 4.3 Milestone 1 JIRA 4.3 EAP 2 Release Notes (and also for other releases ). JIRA 4.3 EAP 2 API Documentation If you encounter any issues with the REST API in JIRA 4.2 or any of the 4.3 EAP releases, feel free to report them (under the Remote API (REST) component ). I am closing this issue, as there currently no plans to enhance the SOAP API. Thanks, Luis Miranda (Atlassian)

            We wrote a patch for this, adding a webservice call getUsersGroups returning an array of RemoteGroup. See attached patch for the code.

            Klas Lindfors added a comment - We wrote a patch for this, adding a webservice call getUsersGroups returning an array of RemoteGroup. See attached patch for the code.

              lmiranda Luis Miranda (Inactive)
              brian@atlassian.com BrianH
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: