Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Add Marking Role Assignments

POST/api/v2/admin/markings/{markingId}/roleAssignments/add

Adds role assignments for the given Marking. For Organization markings, only the USE and DECLASSIFY roles are supported; the ADMINISTER role must be managed via the Organization Role Assignment endpoints.

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

Path parameters

markingId
string

The ID of a security marking.

Request body

AddMarkingRoleAssignmentsRequest
object
Hide child attributes

Hide child attributes

roleAssignments
list<MarkingRoleUpdate>
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/markings/18212f9a-0e63-4b79-96a0-aae04df23336/roleAssignments/add" \ -d '{"roleAssignments":[{"role":"ADMINISTER","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
GetMarkingPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionThe provided token does not have permission to view the marking.
ParametersmarkingId
OrganizationMarkingAdministerRoleNotSupportedError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe ADMINISTER role on Organization markings cannot be managed through the Marking Role Assignments endpoints. To manage administrator roles for an Organization, use the Organization Role Assignment endpoints instead.
ParametersmarkingId, organizationRid
AddMarkingRoleAssignmentsPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not add the MarkingRoleAssignment.
ParametersmarkingId
MarkingNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Marking could not be found.
ParametersmarkingId