Skip to main content

getGroupByUserId

GroupSummaryArrayWrapper getGroupByUserId(userId)

GET /api/2.0/group/user/{userId}

Get user groups

Returns every group the account with the ID in the route belongs to, as a flat list of ID and name pairs. The caller needs the permission to read groups. The call is read-only, is not paged, and answers an empty list both for an account that belongs to no group and for an ID that matches no account, so an empty answer does not prove the account exists. The entries are summaries and carry neither the manager nor the members - read GET api/2.0/group/{id} for the full picture of one of them.

Parameters​

NameInTypeDescriptionNotes
userIdpathUUID (uuid)The ID of the account whose groups are listed, taken from the route. An ID that matches no account yields an empty list rather than 404.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The groups the account belongs to, as ID and name pairsGroupSummaryArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403No permissions to perform this action--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

GroupSummaryArrayWrapper

Authorization​

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

HTTP request headers​

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