Skip to main content

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

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier (MongoDB ObjectId)
testGroupIdstringYesTest 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

FieldTypeDescription
testsarrayArray of test objects
tests[].idstringTest group test relationship ID
tests[].testIdnumberTest ID from LabTest model
tests[].testTitlestringTest title
tests[].tgIdnumberOptional 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