Edit a test plan
PUT
/testplans/{id}Edits a specific test plan
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.editTestPlan({ "id": 123, "testPlanPayload": { "title": "Checkout smoke tests", "priority": 0, "status": 0, "testPlanFolder": 123, "project": 123 }});console.log(result);curl --request PUT \ "https://api.testcollab.io/testplans/123?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "id": 123, "archived": true, "title": "example", "priority": 0, "status": 0, "test_plan_folder": 123, "description": "example", "start_date": "example", "end_date": "example"}'Parameters
Section titled “Parameters”| Name | Location | Type | Required | Description |
|---|---|---|---|---|
id |
path | number | Yes | Test Plan ID |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
id |
number | No | — |
archived |
boolean | No | — |
title |
string | Yes | — |
priority |
number | Yes | Values: 0, 1, 2. |
status |
number | Yes | 0 = Draft; 1 = Ready to execute; 2 = Finish; 3 = Finished (with failures); Values: 0, 1, 2, 3. |
test_plan_folder |
number | Yes | — |
description |
string | No | — |
start_date |
string | No | — |
end_date |
string | No | — |
project |
number | Yes | — |
release |
number | No | Release ID to associate this test plan with (optional). Omit this property entirely and the release of the linked build is filled in automatically; anything sent here stands as sent, including null for “no release”, even when the build belongs to another release () |
build |
number | No | Build ID whose software version this test plan’s 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 — Action status details
| Field | Type | Required | Description |
|---|---|---|---|
id |
number | Yes | — |
title |
string | Yes | — |
priority |
number | Yes | Values: 0, 1, 2. |
status |
number | Yes | 0 = Draft; 1 = Ready to execute; 2 = Finish; 3 = Finished (with failures); Values: 0, 1, 2, 3. |
test_plan_folder |
number | No | — |
start_date |
string | No | — |
end_date |
string | No | — |
created_at |
string | No | — |
custom_fields |
Array of Custom Field Collection Output | No | Array of custom fields |
is_public |
number | No | — |
{ "id": 123, "title": "example", "priority": 0, "status": 0, "test_plan_folder": 123, "start_date": "example", "end_date": "example", "created_at": "example", "custom_fields": []}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |