# Deletes a data group Deletes an existing data group by its unique identifier. The data group must not be the sole data group associated with any policy. ## Endpoint `DELETE /endpointdlp/api/data-classification/data-group/data-group-details/{dataGroupId}` ## Request URL `https://{serverurl}/endpointdlp/api/data-classification/data-group/data-group-details/{dataGroupId}` ## Scope `DesktopCentralCloud.EndpointDLP.DELETE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** (`string`, Mandatory): `application/json` ### Path Parameters - **dataGroupId** (`string`, Mandatory): Unique identifier of the data group. Fetch from [Get All Data Groups](https://www.manageengine.com/products/desktop-central/help/api/cloud/edlp-get-all-data-groups.html) ## Sample Request ### Curl ```curl curl --request DELETE \ --url https://appdomains/endpointdlp/api/data-classification/data-group/data-group-details/{dataGroupId} \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP Code 400 Response Body: `application/json` **JSON Object** - **errorCode** (`string`): Validation error code returned when the data group is still associated with one or more policies and therefore cannot be deleted - **errorMessage** (`string`): Reason the data group cannot be deleted (e.g., associated with policies) ### HTTP Code 401 Response Body: `application/json` **JSON Object** - **errorCode** (`long`): Unauthorized error code: credentials missing, expired, or invalid - **errorMsg** (`string`): Authentication failure reason ### HTTP Code 500 Response Body: `application/json` **JSON Object** - **errorCode** (`string`): Internal error code returned when deleting a data group fails - **errorMessage** (`string`): Failure message describing why the data group could not be deleted ## Possible Response Codes - `200` HTTP code - `400` HTTP code - `401` HTTP code - `500` HTTP code ## Sample Response: HTTP 200 ```text 200 OK ``` ## Sample Response: HTTP 400 Data group is associated with policies ```json { "errorMessage": "Cannot delete data group. It is associated with policies", "errorCode": "INTERNAL_ERROR" } ``` ## Sample Response: HTTP 401 User unauthorized ```json { "errorMessage": "User does not have access to delete this data group", "errorCode": "UAC_UNAUTHORIZED" } ``` ## Sample Response: HTTP 500 Internal server error ```json { "errorMessage": "Exception occurred while deleting 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.