Get Test Group Tests from Source (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/labs/test-groups/:testGroupId/tests/source
Actual backend path: /v1/workspace/:workspaceId/labs/test-groups/:testGroupId/tests/source
Description
Get default test IDs from the source JSON file for a test group. This reads the cached JSON file from the seeding process and returns the test IDs that were originally associated with this test group.
Authentication
Required: JWT token in Authorization header
Required Permissions:
labs.view
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier (MongoDB ObjectId) |
testGroupId | string | Yes | Test group identifier (MongoDB ObjectId) |
Response 200 OK
{
"testIds": [285899, 285897, 285895, 285896, 285893]
}
Response Fields
| Field | Type | Description |
|---|---|---|
testIds | array | Array of test IDs from the source JSON file (only includes tests that exist in the workspace) |
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
labs.view) - 404 Not Found: Workspace, test group not found, or source file not found
- 500 Internal Server Error: Server error or failed to read source file
Notes
- Source file must exist (created during seeding process)
- Only returns test IDs that exist in the workspace
- Source files are located in
lab-seed/testgroups/{testGroupId}-tests.json - This endpoint is useful for restoring default test selections