setGroupManager
GroupWrapper setGroupManager(id, SetManagerRequest)
PUT /api/2.0/group/{id}/manager
Set a group manager
Makes an account the manager of a group, replacing whoever managed it before. The caller needs the permissions to edit groups and to add and remove users. Both the group and the account have to exist: the operation answers 404 when the ID in the route matches no live group and also when userId matches no account, so the message of the error says which of the two was not found. The account is added to the group at the same time, so a manager does not have to be a member beforehand, and the previous manager stays in the group as an ordinary member. A group has one manager, which makes the call idempotent when it names the account that manages it already. The answer is the group with its new manager. To change the members rather than the manager, use PUT api/2.0/group/{id}/members.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | UUID (uuid) | The ID of the group whose manager is set, 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] |
| SetManagerRequest | body | SetManagerRequest | The account to make the manager of the group. | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The group with its new manager | GroupWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read or has no userId | - | - |
| 403 | No permissions to perform this action | - | - |
| 404 | No group has the specified ID, or no account has the specified userId | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json