Duplicate test case
POST
/testcases/copyDuplicates a specific test case
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.copyTestCase({ "testCaseCopyPayload": { "testCase": 123, "project": 123 }});console.log(result);curl --request POST \ "https://api.testcollab.io/testcases/copy?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "testCase": 123, "project": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
testCase |
number | Yes | — |
project |
number | Yes | — |
Response
Section titled “Response”200 — Action status details
| Field | Type | Required | Description |
|---|---|---|---|
status |
boolean | Yes | — |
created_id |
number | Yes | — |
message |
string | No | — |
{ "status": true, "created_id": 123, "message": "example"}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
403 |
Forbidden |