# Creates a new data group Creates a new data group for the customer with the specified data rules. **Endpoint:** `POST /endpointdlp/api/data-classification/data-group/data-group-details` ## Request URL `https://{server-hostname}:8383/endpointdlp/api/data-classification/data-group/data-group-details` ## Scope `EndpointDLP.CREATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** (`string`, Mandatory): `application/dataGroupDetail.v1+json` - **Content-Type** (`string`, Mandatory): `application/dataGroupDetail.v1+json` ### Request Body `application/json` - JSON object - **dataGroupDetail** (`JSON object`, Mandatory): Data group detail wrapper ## Sample Request ```curl curl --request POST \ --url https://appdomain/endpointdlp/api/data-classification/data-group/data-group-details \ --header 'Accept: application/dataGroupDetail.v1+json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/dataGroupDetail.v1+json' \ --data '{"dataGroupDetail":{"dataGroupId":null,"lastModifiedTime":null,"creationTime":null,"lastModifiedUser":null,"dataRuleDetails":[{"dataRuleId":"11","noOfOccurrence":"2"}],"dataGroupDescription":"Group for personal identifiable information rules","dataGroupName":"PII Data Group","createdUser":null,"dataRuleSummaryBeanList":[{"regexSubRuleBean":{"dictionaryWordList":[],"regexValueList":["\\d{3}-\\d{2}-\\d{4}"]},"keywordSubRuleBean":null,"dataRuleId":null,"noOfOccurrence":"1","extensionList":null,"dataRuleName":"SSN Detection Rule","fingerprintSubRuleBean":null,"subRuleTypeId":1},{"regexSubRuleBean":null,"keywordSubRuleBean":{"fileDetailBean":{"fileName":"confidential-keywords.txt","fileLocation":"/dlp/refdata/uploads/confidential-keywords.txt"},"caseSensitive":false},"dataRuleId":null,"noOfOccurrence":"1","extensionList":null,"dataRuleName":"Confidential Keyword Rule","fingerprintSubRuleBean":null,"subRuleTypeId":2},{"regexSubRuleBean":null,"keywordSubRuleBean":null,"dataRuleId":null,"noOfOccurrence":"1","extensionList":null,"dataRuleName":"Source Code Fingerprint Rule","fingerprintSubRuleBean":{"fileDetailBean":{"fileName":"source-code-template.docx","fileLocation":"/dlp/refdata/uploads/source-code-template.docx"}},"subRuleTypeId":3}]}}' ``` ## Sample Request Body Create a new data group containing one rule of each sub-rule type (regex, keyword, fingerprint). For keyword/fingerprint rules, fileName and fileLocation come from the Upload Reference File API response. ```json { "dataGroupDetail": { "dataGroupId": null, "lastModifiedTime": null, "creationTime": null, "lastModifiedUser": null, "dataRuleDetails": [ { "dataRuleId": "11", "noOfOccurrence": "2" } ], "dataGroupDescription": "Group for personal identifiable information rules", "dataGroupName": "PII Data Group", "createdUser": null, "dataRuleSummaryBeanList": [ { "regexSubRuleBean": { "dictionaryWordList": [], "regexValueList": [ "\\d{3}-\\d{2}-\\d{4}" ] }, "keywordSubRuleBean": null, "dataRuleId": null, "noOfOccurrence": "1", "extensionList": null, "dataRuleName": "SSN Detection Rule", "fingerprintSubRuleBean": null, "subRuleTypeId": 1 }, { "regexSubRuleBean": null, "keywordSubRuleBean": { "fileDetailBean": { "fileName": "confidential-keywords.txt", "fileLocation": "/dlp/refdata/uploads/confidential-keywords.txt" }, "caseSensitive": false }, "dataRuleId": null, "noOfOccurrence": "1", "extensionList": null, "dataRuleName": "Confidential Keyword Rule", "fingerprintSubRuleBean": null, "subRuleTypeId": 2 }, { "regexSubRuleBean": null, "keywordSubRuleBean": null, "dataRuleId": null, "noOfOccurrence": "1", "extensionList": null, "dataRuleName": "Source Code Fingerprint Rule", "fingerprintSubRuleBean": { "fileDetailBean": { "fileName": "source-code-template.docx", "fileLocation": "/dlp/refdata/uploads/source-code-template.docx" } }, "subRuleTypeId": 3 } ] } } ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` - JSON object - **dataGroupDetail** (`JSON object`): Data group detail wrapper ### HTTP Code 400 Response body: `application/json` - JSON object - **errorCode** (`string`): Validation error code. Common value: INTERNAL_ERROR when the data group/rule name already exists - **errorMessage** (`string`): Validation failure message describing the cause (e.g., duplicate data group name) ### HTTP Code 500 Response body: `application/json` - JSON object - **errorCode** (`string`): Internal error code returned when creating a data group fails - **errorMessage** (`string`): Failure message describing why the data group could not be created ## Possible Response Codes - **200**: HTTP code - **400**: HTTP code - **500**: HTTP code ## Sample Response: HTTP 200 Successful data group creation containing one rule of each sub-rule type (regex, keyword, fingerprint) ```json { "dataGroupDetail": { "dataGroupId": "602", "createdUserId": "101", "lastModifiedTime": "1776085156095", "creationTime": "1776085156095", "dataGroupDescription": "Group for personal identifiable information rules", "dataRuleSummaryBeanList": [ { "regexSubRuleBean": { "dictionaryWordList": [], "regexValueList": [ "\\d{3}-\\d{2}-\\d{4}" ] }, "keywordSubRuleBean": null, "dataRuleId": "1000602", "noOfOccurrence": "1", "dataRuleDescription": null, "extensionList": null, "dataRuleName": "SSN Detection Rule", "dataRuleType": null, "fingerprintSubRuleBean": null, "subRuleTypeId": 1 }, { "regexSubRuleBean": null, "keywordSubRuleBean": { "fileDetailBean": { "fileName": "confidential-keywords.txt", "fileLocation": "/dlp/refdata/uploads/confidential-keywords.txt" }, "caseSensitive": false }, "dataRuleId": "1000603", "noOfOccurrence": "1", "dataRuleDescription": null, "extensionList": null, "dataRuleName": "Confidential Keyword Rule", "dataRuleType": null, "fingerprintSubRuleBean": null, "subRuleTypeId": 2 }, { "regexSubRuleBean": null, "keywordSubRuleBean": null, "dataRuleId": "1000604", "noOfOccurrence": "1", "dataRuleDescription": null, "extensionList": null, "dataRuleName": "Source Code Fingerprint Rule", "dataRuleType": null, "fingerprintSubRuleBean": { "fileDetailBean": { "fileName": "source-code-template.docx", "fileLocation": "/dlp/refdata/uploads/source-code-template.docx" } }, "subRuleTypeId": 3 } ], "labelId": "0", "lastModifiedUserId": "101", "customerId": "5001", "lastModifiedUser": "john.doe", "dataRuleDetails": [ { "dataRuleId": "11", "noOfOccurrence": "2" } ], "dataGroupName": "PII Data Group", "createdUser": "john.doe" } } ``` ## Sample Response: HTTP 400 Data group name already exists ```json { "errorMessage": "This Rule Name already exist", "errorCode": "INTERNAL_ERROR" } ``` ## Sample Response: HTTP 500 Internal server error ```json { "errorMessage": "Exception occurred while creating DataGroup", "errorCode": "INTERNAL_ERROR" } ``` ## Rate Limit **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.