# 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://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/endpointdlp/api/data-classification/data-group/data-group-details` ## Scope `DesktopCentralCloud.EndpointDLP.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers | Name | Type | Required | Value | |---|---|---|---| | 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 curl --request POST \ --url https://appdomains/endpointdlp/api/data-classification/data-group/data-group-details \ --header 'Accept: application/dataGroupDetail.v1+json' \ --header 'Authorization: Zoho-oauthtoken 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, such as a 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" } ``` ![ ](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **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.