Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DTPDEVEL and version 2024.1

...

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:

...

  1. Stop Data Collector (see Stopping DTP Services) to prevent new data from potentially being sent to the project.
  2. 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
    languagexml
    titleExample 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
  3. The endpoint immediately returns information about the progress. The following is a sample response:

    Code Block
    languagetext
    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
    titleHow 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.