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: "Hyzer, Chris" <>
  • To: "Katika,Shanthi Swaroop" <>, "" <>
  • Subject: [grouper-users] RE: Excluding include/exclude groups in Get Groups WS API
  • Date: Fri, 30 Dec 2016 02:05:52 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:hHmL+hbwt4ahmJLbTVuqdfP/LSx+4OfEezUN459isYplN5qZpsy+YB7h7PlgxGXEQZ/co6odzbGH7+a4BCdcvN6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCzbL52Ixi6txndu8kZjYZtKqs61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzocOjUn7G/YlNB/jKNDoBKguRN/xZLUYJqIP/Z6Z6/RYM8WSXZEUstXSidPAJ6zb5EXAuQBI+hWspX9qVUNoxuwBwasBf/gxTBTi3DswaE2z/4sHR3a0AEiGd8FrXTarM/yNKcXSe25wqvGzDXCbvxIwzfx8JXDfw4hofGWXLJwasTdwlQoGgPAklqQqYzkPjKL2eQXqGWb7vFgWv61h246swF+vD6vxsE2hobXm40V10nJ+CNky4g7It24TVR0Yd+iEJZItiGaMZd2Td04Q2Fupik61qMKtYSlcycX1ZQr3wPfa+SZfIiO5BLvTvieLiplhH9jZbmxhA6y/FC+xuLmSsW4zVNHojdYntXRs30N2RPe5tSbRvZ4/EquxzmC2g/W5+xBP0w4ibfXJ4Y8zrM+ipYfq0DOEjLslEnokaObcl8o9vWq5unmZLjtu4WSOJVuig7kN6Qjgsy/Dvo8MggJR2WV4fix2rr/8UHnWblEk+U4nrTAvJDdPssUuLS1AwhI0oY/8Bm/CCqm0NIFknUdNFJFYhWHj5T3NF7SPPD4DPC/g1K2nDds2vDGIrnhApLKLnjAirvuYbF960tExAoyy9BQ+Y5UB6kfLP3pRkP9qdnVAgIkPwCpxuvnBtpw2p8CVW+KAKKWLqzfvFCN6+8qPeWAeJIZtC74K/c/5v7uiXE5mUUafamsxZYXbWy3HvRmIkSYf3XsmMwMEWYRvgUiVuDqlUWCXiBVZ3a0Ra4z+Cw0CJ++AYfZWo+tmKCB3Du8HpBOaWBGEFeMEWrwd4qaQfcAcT+SItR/nTweTrisUIsh1RC1tA/m0LprMPDY+iwetZL/ytd1/evTmg8u9TBqFciSzXyCT3wn1l8PEnUV1bx+okU58VeK17R4grRjCtVJ4PRRGE9uLp3V0+15AvjvVAaHc9uUHhLuCNq8BiwpQ8h03sQDeV1VGtO+gwrF0jbwRbIZivbDUJMu9b/E0mK0Ot1w0W3u1a89gkMgT9cVc2Cqm/gs2RLUAtuDs1SLmrzuPY8cxi/Wvi/XyGGOrVNVSiZxSq6DQGgSYE2QoNjksBCRB4SyAKgqZ1MSgfWJLbFHP5iw1Q1L
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

The paging in getGroups WS is fixed in patch #7 of 2.3.0 WS

 

https://bugs.internet2.edu/jira/browse/GRP-1449

 

Thanks

Chris

 

From: Katika,Shanthi Swaroop [mailto:]
Sent: Wednesday, November 16, 2016 9:14 AM
To: Hyzer, Chris <>;
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" <>
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: [] 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



  • [grouper-users] RE: Excluding include/exclude groups in Get Groups WS API, Hyzer, Chris, 12/30/2016

Archive powered by MHonArc 2.6.19.

Top of Page