Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: REST call to get groups based on a stem

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: REST call to get groups based on a stem


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Schreiber, Bernard" <>, "Klug, Lawrence" <>, "" <>
  • Subject: [grouper-users] RE: REST call to get groups based on a stem
  • Date: Fri, 31 Aug 2012 03:53:00 +0000
  • Accept-language: en-US

There isnt real REST here... basically some parts are in the URL, and some parts are in the query params.  If you have a LITE request, you can put attributes in the query params including the object type.  So you just take the same URL:

/grouper-ws/servicesRest/v2_1_001/groups

Then add a param for the type: 

?wsLiteObjectType=WsRestFindGroupsLiteRequest

Then add a param for each attribute in the Lite request:

&queryFilterType=FIND_BY_STEM_NAME&stemName=aStem&stemNameScope=ALL_IN_SUBTREE

If you look at the samples for the ones with query params, you can see the rest-like calls:

http://anonsvn.internet2.edu/viewvc/viewvc.py/i2mi/trunk/grouper-ws/grouper-ws/doc/samples/findGroups/WsSampleFindGroupsRestLite_withInput_http_json.txt?revision=8390&view=co

Then you can subtract form the sample any lite params you dont want to use, and append ones you do want to use.

However, note the the return format is not specified, so you will get the default which pre 2.1.2 is xhtml, so you can put the format in the URL:

FROM:

/grouper-ws/servicesRest/v2_1_001/groups

TO:

/grouper-ws/servicesRest/json/v2_1_001/groups

Is that the question?  Let me know if you need more info

Thanks,
Chris


From: Schreiber, Bernard []
Sent: Thursday, August 30, 2012 12:13 PM
To: Chris Hyzer; Klug, Lawrence;
Subject: RE: REST call to get groups based on a stem

Thanks Chris!  I just tested this in my dev environment and the GET request below worked for me.  What I was trying to do was take the POST below as well as all the other POST examples from the samples (webservicecall.txt type files) and generalize that into a rest request and was having difficulty doing that on a consistent basis.  I appreciate your time but could you speak briefly to how the following:

 

POST /grouper-ws/servicesRest/v2_1_001/groups HTTP/1.1

Authorization: Basic xxxxxxxxxxxxxxxxx==

Content-Type: text/x-json; charset=UTF-8

{

"WsRestFindGroupsLiteRequest":{

"queryFilterType":" FIND_BY_STEM_NAME",

"stemName":"aStem",

"stemNameScope": "ALL_IN_SUBTREE"

}

}

 

can be converted to a rest style url or just point me to examples in the docs that portray this?

 

Thanks,

Bernard 

 


From: Chris Hyzer []
Sent: Thursday, August 30, 2012 8:28 AM
To: Klug, Lawrence;
Cc: Schreiber, Bernard
Subject: RE: REST call to get groups based on a stem

You should also be able to do something like this:

/grouper-ws/servicesRest/json/v2_1_001/groups?wsLiteObjectType=WsRestFindGroupsLiteRequest&queryFilterType=FIND_BY_STEM_NAME&stemName=aStem&stemNameScope=ALL_IN_SUBTREE

Thanks,
Chris


From: [] on behalf of Chris Hyzer []
Sent: Thursday, August 30, 2012 11:14 AM
To: Klug, Lawrence;
Cc: Schreiber, Bernard
Subject: [grouper-users] RE: REST call to get groups based on a stem

Its something like:

 

POST /grouper-ws/servicesRest/v2_1_001/groups HTTP/1.1

Authorization: Basic xxxxxxxxxxxxxxxxx==

Content-Type: text/x-json; charset=UTF-8

 

{

  "WsRestFindGroupsLiteRequest":{

    "queryFilterType":" FIND_BY_STEM_NAME",

    "stemName":"aStem",

    "stemNameScope": "ALL_IN_SUBTREE"

  }

}

 

 

From: [mailto:] On Behalf Of Klug, Lawrence
Sent: Wednesday, August 29, 2012 12:58 PM
To:
Cc: Schreiber, Bernard
Subject: [grouper-users] REST call to get groups based on a stem

 

We are trying to construct a REST-style call to get all groups in a given stem:

 

http://<host>/grouper-ws/servicesRest/v2_0_0/stems/root:ucla:orgs/groups

 

This generates an error.  What else do we need to provide?  Is this possible?

 

Thanks,

 

Lawrence Klug

IMS Platform Development

310 825-2061

ext 52061

 




Archive powered by MHonArc 2.6.16.

Top of Page