Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Re: Excluding include/exclude groups in Get Groups WS API

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Re: Excluding include/exclude groups in Get Groups WS API


Chronological Thread 
  • From: "Katika,Shanthi Swaroop" <>
  • To: "Hyzer, Chris" <>, "" <>
  • Subject: [grouper-users] Re: Excluding include/exclude groups in Get Groups WS API
  • Date: Wed, 16 Nov 2016 14:13:52 +0000
  • Accept-language: en-US
  • Ironport-phdr: 9a23:x3t0nBMaTG/eemAFboIl6mtUPXoX/o7sNwtQ0KIMzox0I/38rarrMEGX3/hxlliBBdydsKMfzbOK+P2xEUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6zbL9oMRm7ogrdu8kSjIB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0QrNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6apgVRnlgzoFOTEk6mHaksx+grxGrhK9qRJxwIDUb4OUNPVicazQZskVSXZEXstLSyBNHoGxYo0SBOQBJ+ZYqIz9qkMAoRW7HwasGOLvyjxSiXPuwKM60/4uEQfa3AwgHtIFrWnardvvO6cIVuC1y7HIwTveZP5Rwjf965LHcgwgofGPR719atfRyUcrFw/fkFqftJHlMiqT2+8QvWab6O9gWviui24hswxxvyCvydkqionPnI4a1E3L9Th/zY0oJtO4UFZ2bcO6HJZTrS2WKZV6T8E4T2xqtys20KMKtYO5cSQS1Zgr2wTTZ+GHfoSS5h/vSvydLSlkiH54YL6/iQi9/Eu8xuD5U8S7y0pFoyVKn9TJuHAA1hze5dOCR/Rj4Eus2SqA2gXc5+1aIU04iKzWIIM7zLEqjJocq0HDEzf2mEroiK+WcV0p+vOt6+T7erXqvIKcN4Fwig3kLKshh9G/Dfw5MggIQWeb5fyx2KD98UD6WrlGkOM6n6vDvJ3YKskXvLC1DxJX34o77hawFTam0NAWnXkdK1JFfQqKj5PqO17UPPD4DPS/jE63nTd2yfDGOqftDYvQIXjeiLvhZ6py61ZAyAovytBS/51UCqsGIPLuQk/+qsbYAgYkMwyv3ennEs5925gaWWKOGa+ZLLjSvUGS6uIuJemMeJEauCz7K/c7+/7ik2U1lkEAcqm0jtMrbyXyPuV0Ll/dKVHsmNYaWy9euwE+Xf7nknWDSjUVem6/WaR66z0mXsbuR4jZQZ21jabEwTy2BIZ+Z2ZaB0qKHGuyMYiIRr1EPC2IJdJ5nyZBSKOsUZQJ1BeyuRX8xqY9aOfY53tLm4jk0Y0/xOTPlBI7sQd0BsKB02DFdH59hGQPX3V+iLt8qFB8yV6rzKZ8xfFUCIoAtLtyTg4mOMuEnKRBANfoV1eZcw==

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" <>
Date: Tuesday, November 15, 2016 at 4:53 PM
To: "Katika,Shanthi Swaroop" <>, "" <>
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

 

################ 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>

 

################ REQUEST END ###############

 

 

################ 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 &apos;temp&apos; 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>

 

################ 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: [mailto:] On Behalf Of Katika,Shanthi Swaroop
Sent: Tuesday, November 15, 2016 12:39 PM
To:
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




Archive powered by MHonArc 2.6.19.

Top of Page