Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-1449

getGroups paging does not work if you dont pass in a stem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.3.1, 2.4.0, 2.3.0.patch
    • None
    • WS
    • None

    Description

      From: Katika,Shanthi Swaroop
      Sent: Wednesday, November 16, 2016 9:14 AM
      To: Hyzer, Chris ; grouper-users
      Subject: Re: Excluding include/exclude groups in Get Groups WS API

      Chris,

      Thanks a lot! It did work with Get Groups Service but not with the Get Groups Lite Service. I should have mentioned this. And Get Groups service does suit what I’m working on better than the Lite service.

      To give a summary of what I’m working on right now, we have a hierarchical list of organizations where a member of the child group will be a member of the parent group and so on all the way to the root group. To implement this, we plan on adding the overall group of the child group as a member of the parent’s includes group. And when we use the Get Groups web service for a subject from our application, it would return all the groups it belongs to. The application would then filter all the composite groups and display only the overall groups.

      But for our future needs, we will be needing a hierarchical view of all groups like breadcrumbs. Right now, we have two approaches. The first is the create new views in the grouper database and access them to create the breadcrumbs/tree structure. And the second one, which is a little messier, is to use the get Groups Web service to get a list of all groups first, and then to use several Get Members web service requests on the groups to figure out the hierarchy.

      Are there any better ways that you would recommend to use the grouper architecture or web services to determine the hierarchy of groups in grouper?

      Best,
      Swaroop

      From: "Hyzer, Chris" <mchyzer@isc.upenn.edu>
      Date: Tuesday, November 15, 2016 at 4:53 PM
      To: "Katika,Shanthi Swaroop" <skatika@ufl.edu>, "grouper-users@internet2.edu" <grouper-users@internet2.edu>
      Subject: RE: Excluding include/exclude groups in Get Groups WS API

      No sorry, all groups even composites will be included.

      Paging works for me in 2.3 (See below). Any chance you can upgrade or are you doing something different?

      Thanks
      Chris

      [mchyzer@flash pennGroupsClient-2.3.0]$ java -jar grouperClient.jar --operation=getGroupsWs --subjectIdentifiers=mchyzer --pageSize=5 --pageNumber=1 --sortString=displayName --ascending=true --debug=true

                                    1. REQUEST START (indented) ###############

      POST /grouperWs/servicesRest/v2_2_000/subjects HTTP/1.1
      Connection: close
      Authorization: Basic xxxxxxxxxxxxxxxx
      User-Agent: Jakarta Commons-HttpClient/3.1
      Host: grouperws.apps.upenn.edu:-1
      Content-Length: 291
      Content-Type: text/xml; charset=UTF-8

      <WsRestGetGroupsRequest>
      <subjectLookups>
      <WsSubjectLookup>
      <subjectIdentifier>mchyzer</subjectIdentifier>
      </WsSubjectLookup>
      </subjectLookups>
      <enabled>T</enabled>
      <pageSize>5</pageSize>
      <pageNumber>1</pageNumber>
      <sortString>displayName</sortString>
      <ascending>T</ascending>
      </WsRestGetGroupsRequest>

                                    1. REQUEST END ###############
                                    1. RESPONSE START (indented) ###############

      HTTP/1.1 201 Created
      Date: Tue, 15 Nov 2016 21:50:12 GMT
      Set-Cookie: JSESSIONID=xxxxxxxxxxxx; Path=/grouperWs
      X-Grouper-resultCode: SUCCESS
      X-Grouper-success: T
      X-Grouper-resultCode2: NONE
      Content-Type: text/xml;charset=UTF-8
      Vary: Accept-Encoding
      Connection: close
      Transfer-Encoding: chunked
      Set-Cookie: BIGipServerPFA-grouperws_pool=3827569836.20480.0000; expires=Wed, 16-Nov-2016 03:50:12 GMT; path=/

      <WsGetGroupsResults>
      <results>
      <WsGetGroupsResult>
      <wsGroups>
      <WsGroup>
      <extension>activeNonAlumniWithPennname</extension>
      <typeOfGroup>group</typeOfGroup>
      <displayExtension>activeNonAlumniWithPennname</displayExtension>
      <description>active people at Penn with pennname (some affiliations filtered out e.g. alumni)</description>
      <displayName>penn:community:activeNonAlumniWithPennname</displayName>
      <name>penn:community:activeNonAlumniWithPennname</name>
      <uuid>a6f648955f0046bf8594aec7b61366ad</uuid>
      <idIndex>152762</idIndex>
      </WsGroup>
      <WsGroup>
      <extension>employeeNonTemp</extension>
      <typeOfGroup>group</typeOfGroup>
      <displayExtension>employeeNonTemp</displayExtension>
      <description>employees other than 'temp' affiliation (faculty and staff)</description>
      <displayName>penn:community:employeeNonTemp</displayName>
      <name>penn:community:employeeNonTemp</name>
      <uuid>0970551c-b2f3-4b84-955d-23529fd35bf1</uuid>
      <idIndex>18245</idIndex>
      </WsGroup>
      <WsGroup>
      <extension>staff</extension>
      <typeOfGroup>group</typeOfGroup>
      <displayExtension>staff</displayExtension>
      <description>generic staff group e.g. for shib</description>
      <displayName>penn:community:staff</displayName>
      <name>penn:community:staff</name>
      <uuid>2804569d9c664517a138d079c07610da</uuid>
      <idIndex>44358</idIndex>
      </WsGroup>
      <WsGroup>
      <extension>ldapReadMemberOf</extension>
      <typeOfGroup>group</typeOfGroup>
      <displayExtension>ldapReadMemberOf</displayExtension>
      <description>if you are in this group you can read memberOf</description>
      <displayName>penn:etc:ldapReadMemberOf</displayName>
      <name>penn:etc:ldapReadMemberOf</name>
      <uuid>fb2bfc5f533b421189d50189c9696a54</uuid>
      <idIndex>240621</idIndex>
      </WsGroup>
      <WsGroup>
      <extension>ldapUsers</extension>
      <typeOfGroup>group</typeOfGroup>
      <displayExtension>ldapUsers</displayExtension>
      <description>users allowed to login to ldap</description>
      <displayName>penn:etc:ldapUsers</displayName>
      <name>penn:etc:ldapUsers</name>
      <uuid>77588c9b-bef5-4a49-929e-ef87b10e0ade</uuid>
      <idIndex>112107</idIndex>
      </WsGroup>
      </wsGroups>
      <resultMetadata>
      <resultCode>SUCCESS</resultCode>
      <success>T</success>
      </resultMetadata>
      <wsSubject>
      <identifierLookup>mchyzer</identifierLookup>
      <resultCode>SUCCESS</resultCode>
      <success>T</success>
      <id>10021368</id>
      <name>Chris Hyzer</name>
      <sourceId>pennperson</sourceId>
      </wsSubject>
      </WsGetGroupsResult>
      </results>
      <resultMetadata>
      <resultCode>SUCCESS</resultCode>
      <resultMessage>Success for: clientVersion: 2.2.0, subjectLookups: Array size: 1: [0]: WsSubjectLookup[subjectIdentifier=mchyzer]

      memberFilter: All, includeGroupDetail: false, actAsSubject: null
      , params: null
      fieldName1: null
      , scope: null, wsStemLookup: null
      , stemScope: null, enabled: T, pageSize: 5, pageNumber: 1, sortString: displayName, ascending: true
      , pointInTimeFrom: null, pointInTimeTo: null</resultMessage>
      <success>T</success>
      </resultMetadata>
      <responseMetadata>
      <resultWarnings></resultWarnings>
      <millis>106</millis>
      <serverVersion>2.3.0</serverVersion>
      </responseMetadata>
      </WsGetGroupsResults>

                                    1. RESPONSE END ###############

      SubjectIndex 0: success: T: code: SUCCESS: subject: 10021368: groupIndex: 0: penn:community:activeNonAlumniWithPennname
      SubjectIndex 0: success: T: code: SUCCESS: subject: 10021368: groupIndex: 1: penn:community:employeeNonTemp
      SubjectIndex 0: success: T: code: SUCCESS: subject: 10021368: groupIndex: 2: penn:community:staff
      SubjectIndex 0: success: T: code: SUCCESS: subject: 10021368: groupIndex: 3: penn:etc:ldapReadMemberOf
      SubjectIndex 0: success: T: code: SUCCESS: subject: 10021368: groupIndex: 4: penn:etc:ldapUsers
      DEBUG: Elapsed time: 1499ms
      [mchyzer@flash pennGroupsClient-2.3.0]$

      From: grouper-users-request
      On Behalf Of Katika,Shanthi Swaroop
      Sent: Tuesday, November 15, 2016 12:39 PM
      To: grouper-users
      Subject: [grouper-users] Excluding include/exclude groups in Get Groups WS API

      Hi,

      I’m making a post call using the getGroups API & WsRestGetGroupsLiteRequest object to get list of a groups a subject belongs too.

      I have been able to filter up to stem level by using the ‘scope’ parameter. But the results include all the includes, excludes, baseAndIncludes groups. Is there a way to further filter and get only the overall group?

      Also, even when I include pageNumber & pageSize, the pagination doesn’t seem to be working. Do I need to set any other variables?

      Grouper version: 2.2.0

      Best,
      Swaroop

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: