Bulk actions on test plans
POST
/testplans/bulkActionBulk actions on test plans
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, TestPlansApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestPlansApi(config);
const result = await api.testPlanBulkActions({ "testPlanBulkActionPayload": { "actionType": "edit", "project": 123, "testplanids": [] }});console.log(result);curl --request POST \ "https://api.testcollab.io/testplans/bulkAction?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "actionType": "edit", "project": 123, "testplanids": [], "priority": 123, "test_plan_folder": 123, "start_date": "example", "end_date": "example", "release": 123, "build": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
actionType |
string | Yes | Values: edit, archive, copy, delete, unarchive. |
project |
number | Yes | — |
testplanids |
Array of number | Yes | — |
priority |
number | No | — |
test_plan_folder |
number | No | — |
start_date |
string | No | — |
end_date |
string | No | — |
release |
number | No | Release ID to associate test plans with (optional) |
build |
number | No | Build ID whose software version these test plans’ results are traceable to (optional; send null to unlink) () |
custom_fields |
Array of Custom Field Input Payload | No | Array of custom fields |
Response
Section titled “Response”200 — Assignment result
| 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 |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |