Skip to main content

groups/{groupid}/users (GET)


Return a list of users in a group

  • REST Method: GET
  • Method Access: public

Uri Parameters

Name Type Description
groupid string either an integer group ID or "=" followed by a double uri-encoded group name

Query Parameters

Name Type Description
sortby {id, username, nick, email, fullname, date.lastlogin, status, role, service}? Sort field. Prefix value with '-' to sort descending. default: No sorting
authenticate bool? Force authentication for request (default: false)
activatedfilter bool? Search for users by their active status
rolefilter string? Search for users by a role name
usernamefilter string? Search for users by name or part of a name
limit string? Maximum number of items to retrieve. Must be a positive number or 'all' to retrieve all items. (default: 100)
offset int? Number of items to skip. Must be a positive number or 0 to not skip any. (default: 0)

Return Codes

Name Value Description
OK 200 Request completed successfully
Bad Request 400 Invalid input parameter or request body
Forbidden 403 Read access is required
Not Found 404 Requested group could not be found

Message Format


<users count="{int}" href="{uri}">
    <user id="{int}" href="{uri}">

Implementation Notes

Groups provide the ability to associate a collection of users with a predefined role.

C# Code Sample: Retrieve Group Users

The following code example retrieves the users in the group with ID 1:

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("groups", "1", "users").Get();

Sample Response from executing Code

Sample response indicating that the group contains the user "user1":

<users count="1" href="http://deki-hayes/@api/deki/groups/1/users">
    <user id="3" href="http://deki-hayes/@api/deki/users/3">

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Retrieve Group Users

The following command retrieves a list of users who are members of group "foo":

Sample Code

curl -u username:password -i http://mindtouch.address/@api/deki/groups/=foo/users

Sample Response from executing Code

group_name = test, group has 3 users

Content-Type: application/xml

<users count="3" querycount="3" totalcount="3" href="">
  <user id="83" href="">
    <email hidden="true"/>
  <user id="82" href="">
    <email hidden="true"/>
  <user id="3" href="">
    <email hidden="true"/>

Implementation notes 

curl flags

Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
Outputs the HTTP response headers. Useful for debugging.


To view a list of all groups, follow the instructions here.
  • Was this article helpful?