Set sort order for test cases
POST
/testcases/setSortOrderSet sort order for 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, TestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestCasesApi(config);
const result = await api.setTestCasesSortOrder({ "testCasesSortOrderPayload": { "testCase": { "id": [], "oldPosition": 123, "newPosition": 123 }, "project": 123 }});console.log(result);curl --request POST \ "https://api.testcollab.io/testcases/setSortOrder?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "TestCase": { "id": [], "suite_id": 123, "oldPosition": 123, "newPosition": 123, "limit": 123 }, "project": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
TestCase |
Test Case Sort Property | Yes | — |
TestCase.id |
Array of number | Yes | Array of test case IDs |
TestCase.suite_id |
number | No | — |
TestCase.oldPosition |
number | Yes | — |
TestCase.newPosition |
number | Yes | — |
TestCase.limit |
number | No | — |
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 |