- URL:
- https://<root>/security/roles/getUsersWithinRole
- Methods:
- POST
- Required Capability:
- Access allowed with any authorized privilege
- Version Introduced:
- 10.1
Description
The get operation returns a list of all user accounts to whom a role has been assigned.
Request parameters
| Parameter | Description | 
|---|---|
| 
 | The name of the role. Example  | 
| 
 | An optional filter to be applied to the resultant user set. | 
| 
 | The maximum number of results to return for this query. Example  | 
| 
 | The response format. The default response format is  Values:  | 
Example usage
The following is a sample POST request for the get operation that seeks to return the first 20 users whose names begin with 'a' that are assigned the 'editor' role:
POST /<context>/admin/security/roles/getUsersWithinRole HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
rolename=editors&filter=&maxCount=20&f=pjsonJSON Response syntax
{
  "users": ["<user1>", "<user2>"],
  "hasMore": <true|false>
}