3.11 Users and Groups (principals)

The root REST resource has a "principals" related link that is used to get users and groups.


[Request]
> curl -k -u dlewis:novell https://amethyst.provo.novell.com:8443/rest

[Response]
{
  "links":[...,{
    "rel":"principals",
    "href":"/principals"
  },...]
}

3.11.1 Get by ID

The principals resource can be used to look up multiple users and groups by ID.


[Request]
> curl -k -u dlewis:novell https://amethyst.provo.novell.com:8443/rest/principals?id=20&id=32&id=46

[Response]
{
  "first":0,
  "count":3,
  "total":3,
  "items":[...]
}

The response is a SearchResultList of UserBrief and GroupBrief objects.

3.11.2 Search

The principals resource can also be used to search for users and groups by keyword.  The keyword query parameter can include wildcards and matches on the full name, email address and login name fields.


[Request]
> curl -k -u dlewis:novell https://amethyst.provo.novell.com:8443/rest/principals?keyword=da*

[Response]
{
  "first":0,
  "count":8,
  "total":8,
  "items":[...]
}

The following query parameters are supported:

  • keyword: search term.  May include wildcards (*, ?), but not as the first character in the keyword ("Test*" is allowed but "*Test" is not).

  • include_groups: "none", "all", "local" or "ldap"

  • include_users: "none", "all", "local" or "ldap"

  • first/count: for paging the results