Delete test case
DELETE
/testcases/{id}Moves a specific test case to its project’s Trash for 60 days (), including an archived case. Existing delete permissions and eligibility checks still apply. The case acts as deleted in active lists, test plans, reports, counts and ordinary API reads, while its data and linked copies are retained for restoration by a company Administrator. Permanent removal occurs after 60 days or when an Administrator empties the project’s Trash.
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, TestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestCasesApi(config);
const result = await api.deleteTestCase({ "id": 123, "project": 123});console.log(result);curl --request DELETE \ "https://api.testcollab.io/testcases/123?token=$TESTCOLLAB_TOKEN&project=123"Parameters
Section titled “Parameters”| Name | Location | Type | Required | Description |
|---|---|---|---|---|
id |
path | number | Yes | Test Case ID |
project |
query | number | Yes | Project ID |
Response
Section titled “Response”200 — Test Case deleted
{}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
403 |
Forbidden |