Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

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
200Test cases successfully sorted
successboolean
400Invalid projectId, itemId, or test case IDs format
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions or no access to project
404Project or item not found, or item does not belong to the project
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
}