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.
Creates a new Marking.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:admin-write.
objectlist<MarkingRoleUpdate>The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations.
WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer.
list<PrincipalId>Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations.
stringstringstringThe ID of a marking category. For user-created categories, this will be a UUID. Markings associated with Organizations are placed in a category with ID "Organization".
objectThe created Marking
stringThe ID of a security marking.
stringThe ID of a marking category. For user-created categories, this will be a UUID. Markings associated with Organizations are placed in a category with ID "Organization".
stringstringstringIf this marking is associated with an Organization, its RID will be populated here.
stringThe time at which the resource was created.
stringThe Foundry user who created this resource
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?preview=true" \
-d '{"initialMembers":["f05f8da4-b84c-4fca-9c77-8af0b13d11de"],"name":"PII","description":"Contains personally identifiable information about our customers","categoryId":"0950264e-01c8-4e83-81a9-1a6b7f77621a","initialRoleAssignments":[{"role":"ADMINISTER","principalId":"f05f8da4-b84c-4fca-9c77-8af0b13d11de"}]}'1
2
3
4
5
6
7
8
9
{
"createdBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de",
"organization": "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa",
"name": "PII",
"description": "Contains personally identifiable information about our customers",
"createdTime": "2003-05-06T12:34:56.789Z",
"id": "18212f9a-0e63-4b79-96a0-aae04df23336",
"categoryId": "0950264e-01c8-4e83-81a9-1a6b7f77621a"
}| Error Name | ||
|---|---|---|
Get | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The provided token does not have permission to view the marking category. | |
| Parameters | markingCategoryId | |
Principal | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | A principal (User or Group) with the given PrincipalId could not be found | |
| Parameters | principalId | |
Create | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | At least one ADMIN role assignment must be provided when creating a marking. | |
| Parameters | | |
Marking | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | A marking with the same name already exists in the category. | |
| Parameters | displayName, categoryId | |
Marking | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The marking name is empty. | |
| Parameters | | |
Create | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not create the Marking. | |
| Parameters | | |
Marking | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given MarkingCategory could not be found. | |
| Parameters | markingCategoryId | |
See Errors for a general overview of errors in the platform.