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.
Client error responses due to invalid input or missing parameters.
Server error responses indicating an issue on the API side.