Skip to main content

Create or Update Test Design Result (v1)

Method & Path

POST /api/v1/workspace/:workspaceId/labs/tests/:testId/design-result

Actual backend path: /v1/workspace/:workspaceId/labs/tests/:testId/design-result

Description

Create a new test design result for a test ID, or update it if it already exists.

Authentication

Required: JWT token in Authorization header

Persona Access:

  • Workspace Owner: Allowed
  • Staff: Allowed (role-based)

Required Permissions:

  • labs.manage

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier (MongoDB ObjectId)
testIdnumberYesNumeric test ID

Request Body

{
"sections": [],
"commentRules": [],
"calculationsRules": []
}
FieldTypeRequiredDescription
sectionsarrayNoTest UI sections definition
commentRulesarrayNoComment rules
calculationsRulesarrayNoCalculation rules

Response 200 OK

{
"designResult": {
"id": "507f1f77bcf86cd799439050",
"workspaceId": "507f1f77bcf86cd799439012",
"testId": 101,
"sections": [],
"commentRules": [],
"calculationsRules": [],
"deletedAt": null,
"createdAt": "2026-01-10T12:00:00.000Z",
"updatedAt": "2026-01-11T08:00:00.000Z"
}
}

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: Workspace not found

422 Validation Error: Invalid workspace ID or invalid test ID