Child pages
  • Find Groups
Skip to end of metadata
Go to start of metadata

Grouper Web Services


Find groups search for groups based on name, attribute, parent stem, etc. Can build queries with group math (AND / OR / MINUS)


  • Use query type to build one query object
  • For AND|OR|MINUS you can link up multiple queries into one
  • Returns groups, can be detailed or not
  • Can actAs another user
  • v2.1 and later, you can sort and/or page the results of individual filter types: parent stem, and approximate group name.  Can sort on name, displayName, extension, or displayExtension.
  • v2.1 and later, you can pass in typeOfGroups to filter by groups/roles or entities

Find groups Lite service

  • Accepts one query to search (cannot use group math)
  • Documentation: SOAP (click on findGroupsLite), REST (click on findGroupsLite)
  • For REST, the request can put data in query string (in URL or request body)
  • REST request (colon is escaped to %3A): GET /grouper-ws/servicesRest/v1_3_000/groups
    • Note: if passing data in request body e.g. actAs, use a POST
  • (see documentation above for details): Request objectresponse object
  • Response codes
  • Samples (all files with "Lite" in them, click on "download" to see file)

Find groups service

Example 1

find groups e.g. in a combobox where you have a string and you split by whitespace and find groups which match all part of the name anywhere

You've got two options:

  1. The simple one, do a subject search with source "g:gsa" and put the free form string in the search, and it will do what you want
  2. Slightly more complex, There is a unit test case based on the java equivalent of the WS API, which works, you can translate this to json or xml or whatever and it will work over WS
GrouperServiceUtils.testSession = GrouperSession.startRootSession();
WsQueryFilter firstQueryFilter = new WsQueryFilter();

WsQueryFilter secondQueryFilter = new WsQueryFilter();

WsQueryFilter complexQueryFilter = new WsQueryFilter();

wsGroups = GrouperServiceLogic.findGroups(
GROUPER_VERSION, complexQueryFilter, null, false, null, null).getGroupResults();

Example 2 find by uuid


  • No labels