Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] using the API to get enabledTime and disabledTime

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] using the API to get enabledTime and disabledTime


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: Ben Beecher <>, " Mailing List" <>
  • Subject: RE: [grouper-users] using the API to get enabledTime and disabledTime
  • Date: Thu, 27 Jun 2019 20:09:29 +0000

SQL:  (change select fields to see more)

 

SELECT immediate_mship_enabled, immediate_mship_enabled_time FROM grouper_memberships_all_v gmav, grouper_groups gg, grouper_members gm, grouper_fields gf

WHERE gmav.member_id = gm.id AND gmav.owner_group_id = gg.id AND gf.name = 'members'

AND gmav.field_id = gf.id AND gg.name = 'test:testGroup' AND gm.subject_id = 'test' AND gm.subject_source = 'jdbc'

 

WS:

 

[mchyzer@flash pennGroupsClient-2.4.0]$ java -jar grouperClient.jar --operation=getMembershipsWs --groupNames=test:testGroup --subjectIdentifiers=test --subjectSources=jdbc --debug=true --enabled=F

Reading resource: grouper.client.properties, from: /home/mchyzer/grouper/pennGroupsClient-2.4.0/grouper.client.properties

WebService: connecting as user: 'test'

WebService: connecting to URL: 'https://grouperdemo.internet2.edu/grouper-ws_v2_4/servicesRest/v2_4_000/memberships'

 

################ REQUEST START (indented) ###############

 

POST /grouper-ws_v2_4/servicesRest/v2_4_000/memberships HTTP/1.1

Connection: close

Authorization: Basic xxxxxxxxxxxxxxxx

User-Agent: Jakarta Commons-HttpClient/3.1

Host: grouperdemo.internet2.edu:-1

Content-Length: 334

Content-Type: text/xml; charset=UTF-8

 

<WsRestGetMembershipsRequest>

  <wsGroupLookups>

    <WsGroupLookup>

      <groupName>test:testGroup</groupName>

    </WsGroupLookup>

  </wsGroupLookups>

  <wsSubjectLookups>

    <WsSubjectLookup>

      <subjectIdentifier>test</subjectIdentifier>

      <subjectSourceId>jdbc</subjectSourceId>

    </WsSubjectLookup>

  </wsSubjectLookups>

  <enabled>F</enabled>

</WsRestGetMembershipsRequest>

 

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

 

 

 

################ RESPONSE START (indented) ###############

 

HTTP/1.1 200 OK

Date: Thu, 27 Jun 2019 19:56:38 GMT

Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips

Set-Cookie: JSESSIONID=xxxxxxxxxxxx;HttpOnly

X-Grouper-resultCode: SUCCESS

X-Grouper-success: T

X-Grouper-resultCode2: NONE

Content-Type: application/xml;charset=UTF-8

Connection: close

Transfer-Encoding: chunked

 

<WsGetMembershipsResults>

  <wsMemberships>

    <WsMembership>

      <membershipId>c36e34413cc546ad8df7631284fb2e6d:d279a903b44c449dbadf6cdd20c589f2</membershipId>

      <immediateMembershipId>c36e34413cc546ad8df7631284fb2e6d</immediateMembershipId>

      <listName>members</listName>

      <listType>list</listType>

      <membershipType>immediate</membershipType>

      <enabled>F</enabled>

      <enabledTime>2019/06/27 19:59:00.000</enabledTime>

      <memberId>bfbfc722a6bf49fea306f4e71882afdf</memberId>

      <groupId>b88088776c6b4ecba61995155c79e146</groupId>

      <subjectId>test</subjectId>

      <subjectSourceId>jdbc</subjectSourceId>

      <groupName>test:testGroup</groupName>

      <createTime>2019/06/27 19:55:57.631</createTime>

    </WsMembership>

  </wsMemberships>

  <wsGroups>

    <WsGroup>

      <extension>testGroup</extension>

      <typeOfGroup>group</typeOfGroup>

      <displayExtension>testGroup</displayExtension>

      <description>Description of testGroup</description>

      <displayName>test:testGroup</displayName>

      <name>test:testGroup</name>

      <uuid>b88088776c6b4ecba61995155c79e146</uuid>

      <idIndex>10224</idIndex>

    </WsGroup>

  </wsGroups>

  <wsSubjects>

    <WsSubject>

      <resultCode>SUCCESS</resultCode>

      <success>T</success>

      <id>test</id>

      <sourceId>jdbc</sourceId>

    </WsSubject>

  </wsSubjects>

  <resultMetadata>

    <resultCode>SUCCESS</resultCode>

    <resultMessage>Found 1 results involving 1 groups and 1 subjects</resultMessage>

    <success>T</success>

  </resultMetadata>

  <responseMetadata>

    <resultWarnings></resultWarnings>

    <millis>122</millis>

    <serverVersion>2.4.0</serverVersion>

  </responseMetadata>

</WsGetMembershipsResults>

 

################ RESPONSE END ###############

 

 

Output template: Index: ${index}: ${type}: ${ownerName}, subject: ${wsSubject.id}, list: ${wsMembership.listName}, type: ${wsMembership.membershipType}, enabled: ${wsMembership.enabled}, available variables: wsGetMembershipsResults, grouperClientUtils, index, wsMembership, type, ownerName

Index: 0: group: test:testGroup, subject: test, list: members, type: immediate, enabled: F

Elapsed time: 1160ms

[mchyzer@flash pennGroupsClient-2.4.0]$

 

From: <> On Behalf Of Ben Beecher
Sent: Thursday, June 27, 2019 2:03 PM
To: Mailing List <>
Subject: [grouper-users] using the API to get enabledTime and disabledTime

 

I see that Grouper 2.4 gives the user the ability to see group members that are disabled because the enabledTime has not yet arrived or the disabledTime has passed for their membership. I would like to get this information using the Grouper Web Service. I want to get a list of disabled members and I would like to see their enabledTime and disabledTime. I tried this request in 2.3 and 2.4 but those details are not included in the response.

          "WsRestGetMembersRequest": {
             "actAsSubjectLookup": {
               "subjectId": "GrouperSystem"
             },
             "wsGroupLookups":[{
               "groupName": groupName
             }],
             "includeSubjectDetail":"T",
          }
        }

I would also like to know if this information is available through a database query.

Ben




Archive powered by MHonArc 2.6.19.

Top of Page