Skip to main content

removeMembersFrom

GroupWrapper removeMembersFrom(id, MembersRequest)

DELETE /api/2.0/group/{id}/members

Remove group members

Removes the listed accounts from a group, leaving the rest of its members in place. The caller needs the permissions to edit groups and to add and remove users, and the ID has to belong to a group that has not been deleted, otherwise the operation answers 404. The accounts themselves are kept; only their membership in this group ends, together with the access they had through it. The call is idempotent and forgiving: an ID that is not a member, and one that matches no account at all, are both skipped without an error, and an empty list simply changes nothing. The answer is the group with the members that remain. Emptying a group cannot be done through POST api/2.0/group/{id}/members, which needs at least one valid account, so list every member here, or move them away with PUT api/2.0/group/{fromId}/members/{toId}.

Parameters​

NameInTypeDescriptionNotes
idpathUUID (uuid)The ID of the group whose members are changed, taken from the route. It has to be a group that has not been deleted, otherwise the operation answers 404.[required] [example: 00000000-0000-0000-0000-000000000000]
MembersRequestbodyMembersRequestThe accounts to add, replace with, or remove.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The group with the members that remainGroupWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403No permissions to perform this action--
404No group has the specified ID--
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​

GroupWrapper

Authorization​

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

HTTP request headers​

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