Replace all grants for a user
PUT/user/:id/grant
Replace all existing grants for a user with a new set of grants. This operation deletes all existing grants and creates the new ones.
- Send an empty array
[]to remove all grants from the user. - Send a non-empty array to replace all grants with the specified ones.
The operation is transactional: if any new grant fails validation, no changes are made.
You can use either role_id or role_slug for each grant in the request.
Request
Responses
- 200
- 204
- 400
- 4XX
- 5XX
Grants were replaced successfully.
All grants were removed (empty array was sent).
The request failed validation. See POST endpoint for common causes.
Client error responses due to invalid input or missing parameters.
Server error responses indicating an issue on the API side.