跳到主要内容

addMembersTo

GroupWrapper addMembersTo(id, MembersRequest)

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

Add group members

Adds the listed accounts to a group, keeping the members it already has. 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. Accounts that cannot be group members - a guest, a disabled account or an ID that matches nobody - are silently skipped instead of failing the call, so compare the members in the answer with what was sent to see what was actually applied. The call is idempotent for an account that is already a member, and it does not change who manages the group; use PUT api/2.0/group/{id}/manager for that. The answer is the group with its members after the addition. To replace the whole list instead of extending it, use POST api/2.0/group/{id}/members.

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 its members after the additionGroupWrapperX-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