Site group management - Get all site groups
OVERVIEW
A list of site groups
Request URI
GET /api/3/sites/{siteid}/groups?type={type}&ordertype={ordertype}&orderby={orderby}
Request parameters
Parameter | Value | Description |
---|---|---|
siteid (required) | integer | The ID of the site. The siteid can be obtained by calling the Get site list API |
type (optional) |
org (only org groups which are in site) admin groups (Site roles ) - still pending, not implemented |
Filter the group list by this 6 options. If no parameter is provided for filter then all site groups are returned. |
ordertype(optional) | name (name of the group) type (type of group) numberofusers (number of users inside the group) created (created date of group) modified (modified date of group) |
Order the group by this 5 options. If no parameter is provided for ordertype then it take group name as a default value.. |
orderby(optional) | asc (For ascending order) desc (For descending order) |
Sort the group list by this 2 options. If no parameter is provided for orderby then it sort group list in ascending order. |
q (optional) (Introduced from Collaborate 5.0 and above) | String | Text that will be searched against the group name to filter out the list of the group. |
Response
<sitegroups>
A list of group objects
</sitegroups>
Notes :
In response we get all site groups like org,site,system,admin,sync. for more detail of Admin Group refer Admin group representation
Is there a method of limiting the number of responses? Or forcing an exact match on the q parameter? I'm trying to identify the id of the existing site group when the add site group post call fails due to a "site group already existing" error. Problem is I'm getting multiple ID's returned from the request above when trying to use q to filter out all but the target site group.
Comments
1 Comments