Skip to main content

Seed Test Units (v1)

Method & Path

POST /api/v1/workspace/:workspaceId/labs/test-units/seed

Actual backend path: /v1/workspace/:workspaceId/labs/test-units/seed

Description

Seed test units from external sources. This endpoint replaces existing test units and adds missing ones from the seed data.

Authentication

Required: JWT token in Authorization header

Required Permissions:

  • labs.manage

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier (MongoDB ObjectId)

Response 200 OK

{
"success": true,
"count": 25,
"message": "Successfully seeded 25 test units"
}
FieldTypeDescription
successbooleanIndicates if the operation was successful
countnumberNumber of test units seeded
messagestringSuccess message

Common Errors

401 Unauthorized: Missing or invalid authentication token

403 Forbidden: Insufficient permissions (labs.manage required) or subscription expired

404 Not Found: Workspace not found

422 Validation Error: Invalid workspace ID format

500 Internal Server Error: Error during seeding process