Bulk create grants for a user
POST/user/:id/grant
Create multiple grants for a user in a single request. This operation is additive: it adds new grants without affecting existing ones.
The operation is transactional: if any grant fails validation, no grants are created.
You can use either role_id or role_slug for each grant in the request.
Request
Responses
- 201
- 400
- 4XX
- 5XX
All grants were created successfully.
The request failed validation. Common causes:
- A grant already exists for this user with the same NRN and role
- The role does not exist
- The role has an assignment restriction incompatible with the user type
- The requesting user is not authorized to assign the specified role
The cause.index field indicates which grant in the array failed.
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).