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
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier (MongoDB ObjectId) |
testGroupId | string | Yes | Test group identifier (MongoDB ObjectId) |
Request Body
{
"testId": 285899
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
testId | number | Yes | Test 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