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.
The request couldn't be processed. For example, a parameter is invalid, the resource doesn't exist, or you don't have permission. The body is a problem details object (RFC 9457).
Something went wrong on nullplatform's side. The body is a problem details object (RFC 9457).