Skip to main content

Update Test Profile (v1)

Method & Path

PATCH /api/v1/workspace/:workspaceId/labs/test-profiles/:testProfileId

Actual backend path: /v1/workspace/:workspaceId/labs/test-profiles/:testProfileId

Description

Update an existing test profile in the workspace.

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)
testProfileIdstringYesTest profile identifier (MongoDB ObjectId)

Request Body

{
"testProfileTitle": "Complete Blood Count - CBC"
}
FieldTypeRequiredDescription
testProfileTitlestringNoTest profile title (1-500 characters)

Response 200 OK

{
"testProfile": {
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"testProfileTitle": "Complete Blood Count - CBC",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z",
"deletedAt": null
}
}

Common Errors

400 Bad Request: Invalid request body

401 Unauthorized: Missing or invalid authentication token

403 Forbidden: Insufficient permissions (labs.manage required)

404 Not Found: Test profile or workspace not found

409 Conflict: Test profile with the same title already exists

422 Validation Error: Invalid workspace ID, test profile ID format, or validation errors