Deletes test cases
PUT
/testcases/bulkDeleteMoves the selected test cases, including archived cases, to their project’s Trash for 60 days (). Existing delete permissions and eligibility checks still apply. Cases act as deleted in ordinary reads; their data and linked copies remain available for company Administrator restoration.
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.bulkDeleteTestCase({ "bulkDeletePayload": { "ids": [], "project": 123 }});console.log(result);curl --request PUT \ "https://api.testcollab.io/testcases/bulkDelete?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "ids": [], "project": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
ids |
Array of number | Yes | — |
project |
integer | Yes | — |
Response
Section titled “Response”200 — Test Case deleted
| Field | Type | Required | Description |
|---|---|---|---|
status |
boolean | Yes | — |
affected |
number | No | — |
details |
Array of Bulk Action Result Detail | No | — |
message |
string | Yes | — |
queue |
Background job | No | — |
queue.id |
number | Yes | — |
queue.status |
number | Yes | 0=queued; 1=in-progress; 2=done; 3=failed |
queue.percent_done |
number | Yes | When status =1, this will indicate progress % |
queue.created_at |
string | Yes | — |
queue.updated_at |
string | Yes | — |
queue.results |
string | No | JSON object |
{ "status": true, "affected": 123, "details": [], "message": "example", "queue": { "id": 123, "status": 123, "percent_done": 123, "created_at": "example", "updated_at": "example", "results": "example" }}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
403 |
Forbidden |