Error: "Cannot delete non-empty project" When Deleting Empty Project

Symptom

After deleting all tests in a project, attempting to delete the project itself results in the error "Cannot delete non-empty project".

Reason

If a test was deleted without also deleting test reports associated with it, then even though the reports are no longer visible in the UI, the existence of these reports means the project remains non-empty.

In other words, delete all tests and test reports before the project they belong to is considered empty.

To verify if any test reports still exist under the project, execute the following API request:

GET https://a.blazemeter.com/api/v4/masters?projectId=<project_id>

(Replace <project_id> with your project's ID.)

If there are any reports under the project, they will be listed within the response message.

Note: Issuing API requests requires passing your BlazeMeter API and secret keys. For more details on how to use the API, including the keys, please refer to the API Overview guide.

Solution

If all tests have been deleted and all that remain are test reports that are no longer needed, you can force-delete the project via the API

Caution: This deletion is irreversible!

To perform the forced deletion, execute the following API request:

DELETE https://a.blazemeter.com/api/v4/projects/{project_id}?force=true

(Replace <project_id> with your project's ID.)

Note: Issuing API requests requires passing your BlazeMeter API and secret keys. For more details on how to use the API, including the keys, please refer to the API Overview guide.