Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Remove Enrollment Role Assignments

POST/api/v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:admin-write.

Path parameters

enrollmentRid
string

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

RemoveEnrollmentRoleAssignmentsRequest
object
Hide child attributes

Hide child attributes

roleAssignments
list<RoleAssignmentUpdate>
optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/admin/enrollments/ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6/roleAssignments/remove?preview=true" \ -d '{"roleAssignments":[{"roleId":"8bf49052-dc37-4528-8bf0-b551cfb71268","principalId":"f05f8da4-b84c-4fca-9c77-8af0b13d11de"}]}'

Error responses

Error Name
PrincipalNotFoundError CodeNOT_FOUND
Status Code404
DescriptionA principal (User or Group) with the given PrincipalId could not be found
ParametersprincipalId
EnrollmentRoleNotFoundError CodeNOT_FOUND
Status Code404
DescriptionOne of the provided role IDs was not found.
Parameters
RemoveEnrollmentRoleAssignmentsPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not remove the EnrollmentRoleAssignment.
ParametersenrollmentRid
EnrollmentNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Enrollment could not be found.
ParametersenrollmentRid