Link bulk test cases
POST
/linkedtestcases/bulkLinkBulk copy of Test Cases
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, LinkedtestcasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new LinkedtestcasesApi(config);
const result = await api.bulkLinkTestCase({ "bulkLinkTestCasesPayload": { "ids": [], "project": 123, "issueKey": "example", "im": "example" }});console.log(result);curl --request POST \ "https://api.testcollab.io/linkedtestcases/bulkLink?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "ids": [], "project": 123, "issue_key": "example", "issue_id": 123, "im_project_id": "example", "im_instance_id": "example", "im": "example"}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
ids |
Array of number | Yes | — |
project |
integer | Yes | — |
issue_key |
string | Yes | — |
issue_id |
number | No | — |
im_project_id |
string | No | — |
im_instance_id |
string | No | — |
im |
string | Yes | — |
Response
Section titled “Response”200 — Test Cases Linked
| 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 |