Skip to main content

getGroups

GroupArrayWrapper getGroups(userId, manager, count, startIndex, sortBy, sortOrder, filterValue)

GET /api/2.0/group

Get groups

Returns the groups of the portal, one page at a time, with the summary information about each of them - the ID, the name and the manager - but without the member list. The caller needs the permission to read groups. The call is read-only, and the number of groups that match the filters is reported in the total count of the response, so a client can page through them with count and startIndex. Narrow the result with filterValue on the group name, with userId to keep only the groups that account belongs to, and with manager set to true to keep only the groups it manages; order it with sortBy and sortOrder, and an unknown sortBy falls back to sorting by title. The entries carry no members - read GET api/2.0/group/{id} with includeMembers for one group, or GET api/2.0/group/user/{userId} to find the groups of a single account.

Parameters​

NameInTypeDescriptionNotes
userIdqueryUUID (uuid)Keeps only the groups the account with this ID takes part in. Omit it to search every group of the portal.[optional] [example: 00000000-0000-0000-0000-000000000000]
managerqueryBooleanNarrows userId down to the groups that account manages, instead of every group it belongs to. It has no effect on its own and defaults to false.[optional] [example: false]
countqueryInteger (int32)The size of the page. It defaults to 100, which is also the largest value the operation accepts.[optional] [example: 25] [min: 1] [max: 100]
startIndexqueryInteger (int32)The number of matching groups to skip before the page starts. It defaults to 0, and the total number of matches is reported in the total count of the response.[optional] [example: 0]
sortByqueryStringWhat to order the groups by: Title, Manager or MembersCount, compared without regard to case. Any other value, and omitting the field, orders by title.[optional] [example: Title]
sortOrderquerySortOrderThe direction of the ordering: Ascending, which is the default, or Descending.[optional] [example: Ascending] [enum: 0, 1]
filterValuequeryStringThe text to match against the group name. Omit it to get every group.[optional] [example: Marketing]

Responses​

Status codeDescriptionTypeResponse headers
200The matching groups, with their summary informationGroupArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400A parameter has the wrong type, or the count is outside its allowed range--
403No permissions to perform this action--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

GroupArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json