Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Sort test cases within a component item

Reorders test cases within a component item by providing a new sort order array. The sort order determines the display order of test cases in the UI and affects condition evaluation order. All test case IDs in the array must belong to the specified item.

POST/projects/{projectId}/items/{itemId}/testcases/sort
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired

Project UUID

itemIdstringrequired

Component item UUID

Request body
requiredapplication/json
newSortOrderstring[]required

Array of test case IDs in desired order

Responses
200

Test cases successfully sorted

successboolean
400

Invalid projectId, itemId, or test case IDs format

401

Unauthorized - Invalid or missing authentication token

403

Insufficient permissions or no access to project

404

Project or item not found, or item does not belong to the project

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/testcases/sort" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "newSortOrder": [
    "e57dc37b-7693-4d06-b49c-17084b773aff",
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  ]
}'
Response
{
  "success": true
}