List Test Group Tests (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/labs/test-groups/:testGroupId/tests
Actual backend path: /v1/workspace/:workspaceId/labs/test-groups/:testGroupId/tests
Description
Get all tests associated with a specific 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
{
"tests": [
{
"id": "507f1f77bcf86cd799439011",
"testId": 285899,
"testTitle": "Albumin",
"tgId": 12345
},
{
"id": "507f1f77bcf86cd799439012",
"testId": 285897,
"testTitle": "Alkaline Phosphatase",
"tgId": 12346
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
tests | array | Array of test objects |
tests[].id | string | Test group test relationship ID |
tests[].testId | number | Test ID from LabTest model |
tests[].testTitle | string | Test title |
tests[].tgId | number | Optional tgId from external API |
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
labs.view) - 404 Not Found: Workspace or test group not found
- 500 Internal Server Error: Server error