Documentation Index
Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt
Use this file to discover all available pages before exploring further.
WorkspaceGroupWorkspace is the join-table entity that links a WorkspaceGroup to an individual Workspace, forming the “which workspaces belong to this group” edge. It is written exclusively by the workspace-group management pipeline (group creation / workspace enrollment flows); users have no resource PATCH endpoint against this table. The row carries a soft-delete column so that removing and re-adding the same (group, workspace) pair is legal — the partial unique index enforces at most one live join per pair while allowing re-creation after soft-deletion. An optional created_by foreign key records which People actor enrolled the workspace.
| Naming | Value |
|---|
| Object | WorkspaceGroupWorkspace |
Resource type (JSON:API type) | workspace_group_workspace |
| Collection / records root | — (not a records root) |
| REST base | /v1/workspace-group-workspaces |
| Entity class | WorkspaceGroupWorkspace |
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.
API operations
| Operation | Method & path | Status |
|---|
| List | GET /v1/workspace-group-workspaces | 🟡 Planned |
| Retrieve | GET /v1/workspace-group-workspaces/{id} | 🟡 Planned |
| Create | POST /v1/workspace-group-workspaces | 🟡 Planned |
| Update | PATCH /v1/workspace-group-workspaces/{id} | 🟡 Planned |
| Delete | DELETE /v1/workspace-group-workspaces/{id} | 🟡 Planned |
Data model
Attributes
| Field | Type | Required | Constraints | Allowed values | Description |
|---|
| created_at | 🔒 system — timestamptz | ✅ Yes | Set on INSERT via onCreate hook; never NULL | — | Timestamp when the workspace was enrolled into the group. Set automatically on creation. |
| updated_at | 🔒 system — timestamptz | ⚪ No | Set on INSERT and on every UPDATE via onUpdate hook; nullable in DB | — | Timestamp of the last modification to this join row. Updated automatically. |
| deleted_at | 🔒 system — timestamptz | ⚪ No | NULL means live; non-NULL means soft-deleted. The partial unique index on (workspace_group_pk, workspace_pk) applies only WHERE deleted_at IS NULL. | — | Soft-delete timestamp. When set, the workspace is considered removed from the group. The row is retained so that re-enrollment does not collide with the old row. |
Relationships
| Name | Type | Required | Description |
|---|
| workspace_group | to-one (ManyToOne) | ✅ Yes | The WorkspaceGroup that this row belongs to. FK workspace_group_pk references core_api.workspace_groups(pk); RESTRICT on delete (no cascade). |
| workspace | to-one (ManyToOne) | ✅ Yes | The Workspace being enrolled in the group. FK workspace_pk references core_api.workspaces(pk); RESTRICT on delete (no cascade). |
| created_by | to-one (ManyToOne) | ⚪ No | The People actor who enrolled this workspace into the group. FK created_by_pk references core_api.peoples(pk); SET NULL on delete. Nullable — rows created by system flows or migrations may have no actor. |
System-computed
- pk — auto-increment serial primary key, internal only; never exposed in the public API
- created_at — set to new Date() by the MikroORM onCreate hook on INSERT
- updated_at — set to new Date() by the MikroORM onUpdate hook on every UPDATE
- deleted_at — set by the workspace-group management service when a workspace is removed from a group; never set by user direct PATCH
- Partial unique index workspace_group_workspaces_group_workspace_active_unique enforces at most one live (workspace_group_pk, workspace_pk) pair WHERE deleted_at IS NULL — allows remove-then-re-add without 500 collisions
- The unconditional unique constraint workspace_group_workspaces_workspace_group_pk_wor_3c190_unique was dropped by Migration20260529030000 and replaced with the partial unique index
Example
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "workspace_group_workspace",
"attributes": {
"created_at": "2026-05-28T09:15:00.000Z",
"updated_at": "2026-05-28T09:15:00.000Z",
"deleted_at": null
},
"relationships": {
"workspace_group": {
"data": { "type": "workspace_group", "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479" }
},
"workspace": {
"data": { "type": "workspace", "id": "c9bf9e57-1685-4c89-bafb-ff5af830be8a" }
},
"created_by": {
"data": { "type": "people", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
}
}
}
}
Source: /Users/maximechampoux/platform/apps/api/src/database/entities/WorkspaceGroupWorkspace.ts · domain: workspace · tier: Platform