Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Grouper 2.4 webservice to get members of a group filtered on point in time from and to

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Grouper 2.4 webservice to get members of a group filtered on point in time from and to


Chronological Thread 
  • From: Andrew Jason Morgan <>
  • To: "" <>, Siju Jacob <>
  • Cc: Nazeer Syed <>
  • Subject: Re: [grouper-users] Grouper 2.4 webservice to get members of a group filtered on point in time from and to
  • Date: Wed, 29 Sep 2021 21:47:56 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oregonstate.edu; dmarc=pass action=none header.from=oregonstate.edu; dkim=pass header.d=oregonstate.edu; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lx/OzrAsNW0THrkyXyrRwlpghUntt6mJGagyy3DDtz8=; b=EUPg+Erh4jrUT7fh6I2+Hbg57/TGp2ghiz77D8POMu6ZxB5JSztorktStVpCSREM4tO6ymaiD2HuOKvR23Is7NBQ/5UI29GptnNfURaZl4XyR8jRHB2Ov6tYrDZJvY7xAvE4WtgF2lOJ1F1c3lGYS07RfeAhDRui0HriuTYZUo4MurBigiOXCBEN5nKsA5O9B5Hpp/ChZfM/hqXqcxy4+aYHzy0WL+jO+wGFaZhGPmodjb3JS5+EU3xW6sIi6/WkbDxZ7vTQxQisLxd/XDfyDIhe1BTjfaOG86g+BnAnJlNjqglnQ+DD2VcYE0odQ282S0otdk5ECmMc5QUM1XhDUw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cY7gLBphyf0R3Xri3vU2tAEa+z4CRW3FR3r0GZHJauzpAGGE5oDRvN6HVwizV8uXaEEVGzDTQ6UxFQT8g381NgZLmA7FFE+BweYaed2HzR+WurowNM4FA4ue0VQmzbTwc+HgQfT45CO4VZTVwKzYHsrzZYfvWqcdcYB1NiSLvaipKXv5wwO6/Pk+xXQ2u21HgIcMjs4MMwF3MKQ90ol5qvB7DGGtVYYHfTRqaajshynoHqFxUD6oUu2osjcndgqkEGLTU0GEl8y630zh1IjuM7YPqjP6caLKzReGc9HpTer7Xx+kGqpoqntidutj8hcfbDxtNxR9+BmOPIN5XJ8v+w==
  • Suggested_attachment_session_id: 46015c03-f3df-718b-b543-f0c73fdd7612

Hi Siju,

We have something like this in our Python wrapper library at https://github.com/OSU-IAM/pygrouper.

It constructs this parameter:

'WsRestGetMembersLiteRequest': {
                'pointInTimeFrom': pitfrom,
                'pointInTimeTo': pitto
}

where pitfrom and pitto are formatted as 'yyyy/MM/dd HH:mm:ss.SSS'.

Then it makes a POST to https://{host}/grouper-ws/servicesRest/json/{ws_version}/groups/{groupname}/members.

Note: If you specify a time range by using separate values for pitfrom and pitto, it will return everyone that was a member of the group during that time range.  I don't think it tells you when the member was added.

We also wrote a Python script that makes SQL calls to return the audit trail for a single user or group.  The core Python code is:

def get_log(db, id, mode, filter=None):
      user_where = "string04 = (SELECT ID FROM GROUPER_MEMBERS WHERE subject_id = :id)"
      group_where = "string06 = :id OR string07 = :id"
      where = group_where if mode == 'group' else user_where

      cursor = db.cursor()
      query = f"""
        SELECT
          created_on,
          description
        FROM GROUPER_AUDIT_ENTRY
        WHERE
          {where}
        ORDER BY created_on"""

      cursor.execute(query, id=id)

      return cursor.fetchall()


I hope this helps!

​Andy Morgan, Identity & Access Management, IT Operations and Identity
Oregon State University | University Information and Technology | 541-737-8877



From: <> on behalf of Siju Jacob <>
Sent: Wednesday, September 29, 2021 2:09 PM
To: <>
Cc: Nazeer Syed <>
Subject: [grouper-users] Grouper 2.4 webservice to get members of a group filtered on point in time from and to
 

[This email originated from outside of OSU. Use caution with links and attachments.]

Hi Team,

    We are using Grouper 2.4 and looking for a webservice to find members in a group, filtered on point in time from and to.

We need the PIT information in response as well.

Tried the below rest service with a JSON request, it’s not working. Can someone point me to the right service with  correct JSON request.

Also is there a webservice or shell script to read the change log info.

 

grouper-ws/servicesRest/v2_4_000/groups

 

{

  "WsRestGetMembersRequest":{

    "wsGroupLookups":[

      {

        "groupName":"apps:XXXX:RU_Group_name"

      }

    ]

    ,

      "subjectAttributeNames":[

      "description",

      "loginid",

      "name"

    ]

    ,

    "pointInTimeFrom":"2020/01/01 01:01:03",

    "pointInTimeRetrieve":"T",

    "pointInTimeTo":"2021/07/01 01:01:03"

  }

}

 

 

Thanks,

Siju Jacob




Archive powered by MHonArc 2.6.24.

Top of Page