v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Classification

Create Custom Classifier

Use this API to create a custom classifier.

post/api/label-manager/v2/custom-classifiers

Request body

namestring required

The name of the classifier.

descriptionstring

The description of the classifier.

isPIIboolean required

This flag indicates whether the classifier contains personally identifiable information.

detectorVersioninteger

The version number of the detector used by the classifier.

idstring uuid

The unique identifier of the classifier.

codestring

The system-generated code of the classifier.

customboolean

This flag indicates whether the classifier is custom-created.

enabledboolean

This flag indicates whether the classifier is active.

surrogateTypestring

The surrogate type associated with the classifier.

detectorType'PATTERN' | 'DICTIONARY' | 'SURROGATE' | 'VALIDATOR' | 'TEMPLATE' | 'COMPLEX'

The type of detector used by the classifier to classify data.

isGlossaryTermChangedboolean

This flag indicates whether the glossary term association has changed.

lastModifiedDatestring date-time

The date and time when the classifier was last modified.

createdDatestring date-time

The date and time when the classifier was created.

createdBystring uuid

The unique identifier of the user that created the classifier.

lastModifiedBystring uuid

The unique identifier of the user that last modified the classifier.

versioninteger

The version number used for optimistic locking.

Example request

{
  "name": "Employee Id",
  "description": "Find Employee ID",
  "definition": {
    "name": "Employee Id",
    "otCode": "system_address_es",
    "VERSION": 1,
    "SCHEMA_VERSION": "1.0.0",
    "metadata": {
      "displayName": "Credit Card Number",
      "otDisplayName": "Uniform Resource Locator",
      "description": "Detects credit card numbers in text using pattern matching.",
      "locations": [
        "US",
        "EU",
        "APAC"
      ],
      "languages": [
        "en",
        "fr",
        "de"
      ],
      "industries": [
        "Finance",
        "Healthcare"
      ],
      "categories": [
        "PII",
        "Financial"
      ],
      "sensitivityLevel": "HIGH"
    },
    "detections": [
      {
        "type": "PATTERN",
        "pattern": {
          "regex": "[0-9]{1,10}",
          "flags": "mi",
          "groupIndexes": [
            1,
            2
          ]
        },
        "dictionary": {
          "terms": [
            "hello",
            "hello world"
          ]
        },
        "surrogate": {
          "name": "system_address_uk"
        },
        "likelihood": "POSSIBLE",
        "description": "This detection will find unformatted ID",
        "name": "Find Unformatted ID"
      }
    ],
    "detectionRules": [
      {
        "type": "PATTERN",
        "name": "Check If The Finding Starts With 123",
        "dictionary": {
          "terms": [
            "hello",
            "hello world"
          ]
        },
        "pattern": {
          "regex": "[0-9]{1,10}",
          "flags": "mi",
          "groupIndexes": [
            1,
            2
          ]
        },
        "context": {
          "windowBefore": 10,
          "windowAfter": 15
        },
        "likelihoodAdjustment": {
          "adjustLikelihood": 1,
          "setLikelihood": "VERY_LIKELY",
          "type": "SET"
        }
      }
    ]
  },
  "glossaryTerm": {
    "name": "Company ID",
    "id": "a787c869-4628-493b-9393-0007ff6d7494"
  },
  "detectorVersion": 1,
  "id": "a997fe47-a504-4dd4-8eda-52add1a397f0",
  "enabled": true,
  "detectorType": "DICTIONARY",
  "lastModifiedDate": "2024-04-04T11:33:16.538+00:00",
  "createdDate": "2024-04-04T11:33:16.538+00:00",
  "createdBy": "a897fe47-a504-4dd4-8eda-52add1a397f1",
  "lastModifiedBy": "e897fe47-a504-4dd4-8eda-52add1a397f0",
  "version": 1
}

Response

Classifier created successfully

namestring required

The name of the classifier.

descriptionstring

The description of the classifier.

isPIIboolean required

This flag indicates whether the classifier contains personally identifiable information.

detectorVersioninteger

The version number of the detector used by the classifier.

idstring uuid

The unique identifier of the classifier.

codestring

The system-generated code of the classifier.

customboolean

This flag indicates whether the classifier is custom-created.

enabledboolean

This flag indicates whether the classifier is active.

surrogateTypestring

The surrogate type associated with the classifier.

detectorType'PATTERN' | 'DICTIONARY' | 'SURROGATE' | 'VALIDATOR' | 'TEMPLATE' | 'COMPLEX'

The type of detector used by the classifier to classify data.

isGlossaryTermChangedboolean

This flag indicates whether the glossary term association has changed.

lastModifiedDatestring date-time

The date and time when the classifier was last modified.

createdDatestring date-time

The date and time when the classifier was created.

createdBystring uuid

The unique identifier of the user that created the classifier.

lastModifiedBystring uuid

The unique identifier of the user that last modified the classifier.

versioninteger

The version number used for optimistic locking.

Example response

{
  "name": "Employee Id",
  "description": "Find Employee ID",
  "definition": {
    "name": "Employee Id",
    "otCode": "system_address_es",
    "VERSION": 1,
    "SCHEMA_VERSION": "1.0.0",
    "metadata": {
      "displayName": "Credit Card Number",
      "otDisplayName": "Uniform Resource Locator",
      "description": "Detects credit card numbers in text using pattern matching.",
      "locations": [
        "US",
        "EU",
        "APAC"
      ],
      "languages": [
        "en",
        "fr",
        "de"
      ],
      "industries": [
        "Finance",
        "Healthcare"
      ],
      "categories": [
        "PII",
        "Financial"
      ],
      "sensitivityLevel": "HIGH"
    },
    "detections": [
      {
        "type": "PATTERN",
        "pattern": {
          "regex": "[0-9]{1,10}",
          "flags": "mi",
          "groupIndexes": [
            1,
            2
          ]
        },
        "dictionary": {
          "terms": [
            "hello",
            "hello world"
          ]
        },
        "surrogate": {
          "name": "system_address_uk"
        },
        "likelihood": "POSSIBLE",
        "description": "This detection will find unformatted ID",
        "name": "Find Unformatted ID"
      }
    ],
    "detectionRules": [
      {
        "type": "PATTERN",
        "name": "Check If The Finding Starts With 123",
        "dictionary": {
          "terms": [
            "hello",
            "hello world"
          ]
        },
        "pattern": {
          "regex": "[0-9]{1,10}",
          "flags": "mi",
          "groupIndexes": [
            1,
            2
          ]
        },
        "context": {
          "windowBefore": 10,
          "windowAfter": 15
        },
        "likelihoodAdjustment": {
          "adjustLikelihood": 1,
          "setLikelihood": "VERY_LIKELY",
          "type": "SET"
        }
      }
    ]
  },
  "glossaryTerm": {
    "name": "Company ID",
    "id": "a787c869-4628-493b-9393-0007ff6d7494"
  },
  "detectorVersion": 1,
  "id": "a997fe47-a504-4dd4-8eda-52add1a397f0",
  "enabled": true,
  "detectorType": "DICTIONARY",
  "lastModifiedDate": "2024-04-04T11:33:16.538+00:00",
  "createdDate": "2024-04-04T11:33:16.538+00:00",
  "createdBy": "a897fe47-a504-4dd4-8eda-52add1a397f1",
  "lastModifiedBy": "e897fe47-a504-4dd4-8eda-52add1a397f0",
  "version": 1
}