Skip to main content

Add Test to Group (v1)

Method & Path​

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

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

Description​

Add a test to a test group.

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​

{
"testId": 285899
}

Body Parameters​

ParameterTypeRequiredDescription
testIdnumberYesTest ID (positive integer)

Response 201 Created​

{
"success": true
}

Common Errors​

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