Site group management - Get users of a site group
OVERVIEW
This API method returns the users of a site group
Request URI
GET /api/3/sites/{siteid}/groups/{groupid}/users
Request parameters
Parameter | Value | Description |
---|---|---|
siteid | integer | The ID of the site. The siteid can be obtained by calling the Get site list API |
groupid | integer | The ID of the group. The groupid can be obtained by calling Get all site groups API and for Admin groupid refer Admin group representation. |
Response
The response is a list of user objects. The API returns a 200 OK if successful otherwise an error object and error code.
Imran Aziz
FYI Another client has requested the same as Andrew Quinn here. If this was implemented, please let me know. FAO: Tom Sykes
Andrew Quinn I am afraid we do not have an API method that will allow you to get a list of groups that the user belongs to, I have added that to our backlog. Thanks
Hi Imran, could we have the reverse of this for the Users API: Get List of Groups for User. Correct me if I'm wrong, currently the only way to achieve this would be to call the Get all site groups endpoint first, then for each group returned call this endpoint (Get users of a site group) and filter through the combined results for the user in question. This would be an inefficient way if, for example, we have a site Home dashboard that, for the current user, would determine actions/data available based on what groups they belong to. Thanks in advance.
Comments
3 Comments