Users with admin privileges can delete data associated with a single project. The following data is removed:
- All builds associated with the project. This consists of all builds that have at least one run that uses a run configuration associated with the project.
- All run configurations associated with the project.
- All prioritization data for violations that existed in the deleted runs. If a violation is found in a run that is later sent to DTP, default values for assignee, priority, action, risk/impact, due date, and reference number will be assigned to the violation.
The following is not deleted:
- The project itself in DTP. See Deleting Projects.
- Filters associated with the project. See Deleting Filters.
Enabling Project Deletion
The ability to delete a project is disabled by default. Open the <DTP_INSTALL>/bin/variables file and add the following command to JAVA_CONFIG_ARGS (Linux/Solaris) or DTP_JAVA_OPTS (Windows) to enable project deletion:
This functionality is enabled via a DTP HTTP endpoint. You must have admin access to delete project data (see Configuring User Permissions and Groups).
- Stop Data Collector (see Stopping DTP Services) to prevent new data from potentially being sent to the project.
Make a POST request to the following endpoint to begin deleting data for the project:
This endpoint takes a JSON request payload in the following format:
The request must have the header
Content-Type: application/json, otherwise the server will reject the request.
The endpoint immediately returns information about the progress. The following is a sample response:
The response is intended to be human-readable, but the format may change in future DTP releases. If a request to delete project data (or to delete a build) is already in progress, an error message will be returned as the response. You will need to try again later when other data is not being deleted.
How Long Does it Take to Delete Project Data?
The total time required to delete the project data depends on the number of builds, runs per build, and the size of data sent in each run. A project with 100 builds may take less than one minute; for other projects with the same number of builds, deleting the data may take 1 hour.
Monitoring the Request Status
You can make a GET request to the following endpoint to check the status of your project data deletion request:
A job is finished when the response shows
Each request is assigned a
Cleanup job id, which allows you to correlate the status with the call you made to delete the project data. When the data is deleted, the response will continue to show
State: COMPLETED until a new request to delete a build or different project data is made. When the next request is made, it will be assigned a new
Cancelling a Request Already in Progress
Make a POST request to the following endpoint to cancel a request to delete project data:
You do not need to include a request payload. The job will stop as soon as the build currently being deleted is finsihed.