Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Parse Classifications

POST/api/v2/admin/markings/parseClassifications
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.

Parses classification marking strings (e.g. 'S//NF') into their component marking IDs. Strings that cannot be parsed are returned in 'errors' with a human-readable message.

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

Query parameters

preview
booleanoptional

Enables the use of preview functionality.

Request body

ParseClassificationsRequest
object
Hide child attributes

Hide child attributes

classificationStrings
list<string>optional

The classification strings to parse, e.g. 'S//NF'. Duplicate entries are ignored. At most 1000 entries are accepted.

Response body

ParseClassificationsResponse
object
Hide child attributes

Hide child attributes

parsed
map<string, array>optional

Map of valid classification strings to their component marking IDs. Strings that could not be parsed are absent from this map and appear in 'errors' instead.

Show child attributes

Show child attributes

errors
map<string, string>optional

Map of classification strings that could not be parsed to a human-readable error message.

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/parseClassifications?preview=true" \ -d '{"classificationStrings":["MTS//MNF","MU"]}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 { "parsed": { "MTS//MNF": [ "MNF", "MTS" ] }, "errors": { "INVALID_MARKING": "Unknown marking: INVALID_MARKING" } }

Error responses

Error Name
ParseClassificationsPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionThe provided token does not have permission to parse the given classification strings.
ParametersclassificationStrings
CbacUnavailableError CodeINVALID_ARGUMENT
Status Code400
DescriptionCBAC is not available.
Parameters