...
The ability to delete a project data is disabled by default. Open the variables file in <DTP_INSTALL>/bin/
variables file and and add the following command to JAVA_CONFIG_ARGS
(Linux) or DTP_JAVA_OPTS
(Windows) to enable project deletion:
...
- 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:/grs/api/v1.5/admin/projects/deleteData
This endpoint takes a JSON request payload in the following format:Code Block { "project": "BasicProjectCleanup" }
The request must have the header
Content-Type: application/json
, otherwise the server will reject the request.Code Block language xml title Example cURL command curl -u your_username:your_password -X POST -H 'Content-Type: application/json' -d '{"project":"Your Project"}' http://server_name:8080/grs/api/v1.5/admin/projects/deleteData
The endpoint immediately returns information about the progress. The following is a sample response:
Code Block language text Cleanup job id: 33 Description: Deleting data for project: BasicProjectCleanup State: IN_PROGRESS Current status: Deleting data for project 'BasicProjectCleanup': starting. Last status update: 2017-06-27T11:40:08.645 Log: 2017-06-27T11:40:08.645 | Starting: Deleting data for project: BasicProjectCleanup 2017-06-27T11:40:08.645 | Deleting data for project 'BasicProjectCleanup': starting.
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.
Info title 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:
...
Each request is assigned a Cleanup job id
, which 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 job id
.
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 finsihedfinished.