Creates a new data group

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Creates a new data group for the customer with the specified data rules.

Request URL

https://{serverurl}/endpointdlp/api/data-classification/data-group/data-group-details

Scope

DesktopCentralCloud.EndpointDLP.CREATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

AcceptstringMandatory
application/dataGroupDetail.v1+jsonapplication/dataGroupDetail.v1+jsonCopied!
Content-TypestringMandatory
application/dataGroupDetail.v1+jsonapplication/dataGroupDetail.v1+jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
dataGroupDetailJSON ObjectMandatory

Data group detail wrapper

Show Sub-Attributes
dataGroupIdstringMandatory

Unique identifier of the data group (null for creation, required for update)

dataGroupNamestringMandatory

Name of the data group (max 30 chars)

dataGroupDescriptionstringMandatory

Description of the data group (max 250 chars)

createdUserstringMandatory

Username of the creator (null for creation, populated for update)

creationTimestringMandatory

Creation timestamp in epoch millis (null for creation, populated for update)

lastModifiedUserstringMandatory

Username of the last modifier (null for creation, populated for update)

lastModifiedTimestringMandatory

Last modification timestamp in epoch millis (null for creation, populated for update)

dataRuleSummaryBeanListJSON ArrayMandatory

List of custom rule summary details

Show Sub-Attributes
JSON Object
Show Sub-Attributes
dataRuleIdstringMandatory

Unique identifier of the data rule (null for new rule)

dataRuleNamestringMandatory

Name of the data rule (max 30 chars)

noOfOccurrenceintegerMandatory

Number of occurrences threshold

regexSubRuleBeanJSON ObjectMandatory

Regex sub-rule details (required when subRuleTypeId=1, else null)

Show Sub-Attributes
regexValueListarrayMandatory

List of regex patterns

dictionaryWordListarrayMandatory

List of dictionary words

fingerprintSubRuleBeanJSON ObjectMandatory

Fingerprint sub-rule details (required when subRuleTypeId=3, else null)

Show Sub-Attributes
fileDetailBeanJSON ObjectMandatory

File details for the fingerprint reference file uploaded via the Upload Reference File API

Show Sub-Attributes
fileNamestringMandatory

Name of the reference file as returned by the Upload Reference File API

fileLocationstringMandatory

Server-side path of the reference file as returned by the Upload Reference File API

keywordSubRuleBeanJSON ObjectMandatory

Keyword sub-rule details (required when subRuleTypeId=2, else null)

Show Sub-Attributes
caseSensitivebooleanMandatory

Whether keyword matching is case-sensitive

fileDetailBeanJSON ObjectMandatory

File details for the keyword reference file uploaded via the Upload Reference File API

Show Sub-Attributes
fileNamestringMandatory

Name of the reference file as returned by the Upload Reference File API

fileLocationstringMandatory

Server-side path of the reference file as returned by the Upload Reference File API

extensionListarrayMandatory

List of file extensions to scan (null if not applicable)

subRuleTypeIdintegerMandatory

Sub-rule type identifier (1=Regex, 2=Keyword, 3=Fingerprint)

dataRuleDetailsJSON ArrayMandatory

List of predefined rules with occurrence thresholds

Show Sub-Attributes
JSON Object
Show Sub-Attributes
dataRuleIdstringMandatory

Unique identifier of the predefined data rule

noOfOccurrencestringMandatory

Number of occurrences threshold

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
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.

Copied!
  {
    "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
        }
      ]
    }
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
dataGroupDetailJSON Object

Data group detail wrapper

Show Sub-Attributes
dataGroupIdstring

Unique identifier of the data group

dataGroupNamestring

Name of the data group

dataGroupDescriptionstring

Description of the data group

creationTimestring

Creation timestamp (epoch millis as string)

createdUserstring

Username of the creator

createdUserIdstring

User ID of the creator

labelIdstring

Associated label identifier

lastModifiedTimestring

Last modification timestamp (epoch millis as string)

lastModifiedUserstring

Username of the last modifier

lastModifiedUserIdstring

User ID of the last modifier

customerIdstring

Customer identifier

dataRuleDetailsJSON Array

List of predefined rules with occurrence thresholds

Show Sub-Attributes
JSON Object
Show Sub-Attributes
dataRuleIdstring

Unique identifier of the data rule

noOfOccurrencestring

Number of occurrences threshold

dataRuleSummaryBeanListJSON Array

List of custom rule summaries

Show Sub-Attributes
JSON Object
Show Sub-Attributes
dataRuleNamestring

Name of the data rule

dataRuleIdstring

Unique identifier of the data rule

dataRuleTypeinteger

Type of the data rule (1=Predefined, 2=Custom)

dataRuleDescriptionstring

Description of the data rule

noOfOccurrencestring

Number of occurrences threshold

subRuleTypeIdinteger

Sub-rule type identifier (1=Regex, 2=Keyword, 3=Fingerprint)

regexSubRuleBeanJSON Object

Regex sub-rule details (present when subRuleTypeId=1)

Show Sub-Attributes
regexValueListarray

List of regex patterns

dictionaryWordListarray

List of dictionary words

keywordSubRuleBeanJSON Object

Keyword sub-rule details (present when subRuleTypeId=2)

Show Sub-Attributes
caseSensitiveboolean

Whether keyword matching is case-sensitive

fileDetailBeanJSON Object

File details for the keyword reference file

Show Sub-Attributes
fileNamestring

Name of the reference file

fileLocationstring

Server-side path of the reference file

fingerprintSubRuleBeanJSON Object

Fingerprint sub-rule details (present when subRuleTypeId=3)

Show Sub-Attributes
fileDetailBeanJSON Object

File details for the fingerprint reference file

Show Sub-Attributes
fileNamestring

Name of the reference file

fileLocationstring

Server-side path of the reference file

extensionListarray

List of file extensions to scan

- HTTP code 400

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

Validation error code. Common value: INTERNAL_ERROR when the data group/rule name already exists

errorMessagestring

Validation failure message describing the cause (e.g., duplicate data group name)

- HTTP code 500

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

Internal error code returned when creating a data group fails

errorMessagestring

Failure message describing why the data group could not be created

Possible Response Codes

200HTTP code
400HTTP code
500HTTP code

Sample Response: HTTP 200

Successful data group creation containing one rule of each sub-rule type (regex, keyword, fingerprint)

Copied!
  {
    "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"
    }
  }
                
Show full

Sample Response: HTTP 400

Data group name already exists

Copied!
  {
    "errorMessage": "This Rule Name already exist",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

Sample Response: HTTP 500

Internal server error

Copied!
  {
    "errorMessage": "Exception occurred while creating DataGroup",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

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.