Description
Deactivate a user group. All memberships of the group are removed with it, and the group stays registered on the platform as inactive. While the group is inactive, PUT | Update user group, PATCH | Partially update user group, and member changes return 409 api.resource.inactive.
Deactivation is a dedicated action rather than a field, so the active state cannot be changed through PUT | Update user group or PATCH | Partially update user group. Deleting a group has the same effect on the group and its memberships. For more information, access DELETE | Delete user group.
Prerequisites
- An application with the Users authorization granted by the administrator in A2A. For more information, access How to manage authorizations in A2A.
- A valid OAuth 2.0 access token. For more information, access How to authenticate an application in A2A.
Request
POST /api/v2/iam/user-groups/{id}/deactivate
This action takes no request body.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Unique identification code of the user group. |
Example request
POST {{url}}/api/v2/iam/user-groups/7/deactivate
Response
HTTP/1.1 204 No Content
X-Request-Id: 7f3c1a90-2c4e-4b1a-9f5e-0a2b7c9d1e34
A successful deactivation returns no body. To confirm the new state, access GET | List a user group.
Deactivating a group removes all of its memberships. The users keep their accounts, but they lose the access that this group granted them. POST | Activate user group does not restore the memberships, so record the members before you deactivate the group. For the current list, access GET | List all members of a user group.
Errors
| HTTP code | Message | Possible cause | Solution |
|---|---|---|---|
401 |
api.auth.unauthorized |
The access token is missing, invalid, or has expired. | Request a new access token. |
404 |
api.resource.not_found |
The user group does not exist, or it is outside the scope of the authorization. | Check the identification code and the authorization scope. |
409 |
api.resource.conflict.already_inactive |
The user group is already inactive. | No action is required. |
429 |
api.rate_limit_exceeded |
The request rate limit was exceeded. | Wait the number of seconds returned in the Retry-After header and try again. |
For authentication error messages and the 403 versus 404 policy, access API v2 - Conventions and shared behaviors.