Skip to main content

Update Test Group Tests (v1)

Method & Path

PUT /api/v1/workspace/:workspaceId/labs/test-groups/:testGroupId/tests

Actual backend path: /v1/workspace/:workspaceId/labs/test-groups/:testGroupId/tests

Description

Replace all tests in a test group with a new set of tests. This removes all existing tests and adds the new ones.

Authentication

Required: JWT token in Authorization header

Required Permissions:

  • labs.manage

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier (MongoDB ObjectId)
testGroupIdstringYesTest group identifier (MongoDB ObjectId)

Request Body

{
"testIds": [285899, 285897, 285895, 285896, 285893]
}

Body Parameters

ParameterTypeRequiredDescription
testIdsarrayYesArray of test IDs (positive integers)

Response 200 OK

{
"success": true
}

Common Errors

  • 400 Bad Request: Invalid request body, validation errors, or one or more tests not found
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (requires labs.manage)
  • 404 Not Found: Workspace or test group not found
  • 500 Internal Server Error: Server error

Notes

  • This operation replaces all existing tests in the group
  • All tests in testIds must exist in the workspace
  • Empty array is allowed (removes all tests from the group)