Set sort order for testplan folders
POST
/testplanfolders/setOrderSet sort order for testplan folders
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, TestPlanFoldersApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestPlanFoldersApi(config);
const result = await api.setTestplansOrder({ "testPlanFoldersOrderPayload": { "folder": { "dropPosition": 123, "draggedOnFolderId": 123, "targetFolderId": [] }, "project": 123 }});console.log(result);curl --request POST \ "https://api.testcollab.io/testplanfolders/setOrder?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "Folder": { "dropToGap": true, "dropPosition": 123, "draggedOnFolderId": 123, "targetFolderId": [] }, "project": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
Folder |
Test Plan Folder Order Property | Yes | — |
Folder.dropToGap |
boolean | No | — |
Folder.dropPosition |
number | Yes | — |
Folder.draggedOnFolderId |
number | Yes | — |
Folder.targetFolderId |
Array of number | Yes | Array of test plan folder ids which are dragged |
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 |