Classification
Create Custom Classifier
Use this API to create a custom classifier.
post/api/label-manager/v2/custom-classifiers
Request body
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
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
}