Skip to end of metadata
Go to start of metadata

Search for groups

Resource

  • GET| (root)/search?{query_string}

Query String

Search supports the following query string parameters:

  • name=parts_of_name
  • stem=group_stem
  • member=member_id
  • owner=admin_id
  • affiliate=affiliate_name
  • type=search_type (direct | effective)
  • scope=search_scope (one | all)
  • instructor=instructor_id

Search type is direct to search for direct membership and effective to search for effective memberships. Default is direct membership.

Search scope is one to limit results to one level of stem name and all to return all groups.

Searches by name may include the wildcard (*) character.  Note that the V2 search resource automatically searches as if wildcards are present before and after the search string, i.e. *parts_of_name*, even if wildcards are not present in the search string.  You can explicitly add wildcards to a V2 name search string, but they won't change the behavior.  The V3 resource requires wildcards be explicitly defined.  

Search by instructor to find courses for a given instructor.

3 Comments

  1. Can we add GID as a search parameter?

    1. Hi Bill, I'm going to shift the discussion about this feature request over to email to assess demand and ranking in our service backlog.

       

  2. It looks like a slash is required after /search when using more that one param.

    Example:

    • /search?name=u_nebula_fac&member=jvogt returns the same result as /search?member=jvogt, which is a full list of my groups.
    • /search/?name=u_nebula_fac&member=jvogt returns the expected result of groups containing 'u_nebula_fac' that I'm a member of.

    The result headers are also slightly different with the slash and without.

    • With: 
    <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    </head>
    • Without:
    <head>
     <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
     <title>UW Staff</title>
    </head>