# 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 ### Request URL `https://{server-hostname}:8383/endpointdlp/api/data-classification/data-group/data-group-details/{dataGroupId}` ### Scope `EndpointDLP.DELETE` ### Header `Authorization: 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/onpremise/edlp-get-all-data-groups.html) ### Sample Request #### Curl ```curl curl --request DELETE \ --url https://appdomain/endpointdlp/api/data-classification/data-group/data-group-details/{dataGroupId} \ --header 'Accept: application/json' \ --header 'Authorization: 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 ## Possible Response Codes - **200** — HTTP code - **400** — HTTP code - **401** — HTTP code - **500** — HTTP code ## 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" } ``` ## Rate Limits ![](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.