# 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}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)`/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 --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 returned when authentication credentials are missing, expired, or invalid (authentication=required) - **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 ## Sample Responses ### HTTP 200 ```text 200 OK ``` ### HTTP 400 Data group is associated with policies ```json { "errorMessage": "Cannot delete data group. It is associated with policies", "errorCode": "INTERNAL_ERROR" } ``` ### HTTP 401 User unauthorized ```json { "errorMessage": "User does not have access to delete this data group", "errorCode": "UAC_UNAUTHORIZED" } ``` ### HTTP 500 Internal server error ```json { "errorMessage": "Exception occurred while deleting DataGroup", "errorCode": "INTERNAL_ERROR" } ``` **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.