Outcome
Ask the platform to archive an authorized empty Compose workspace, then remove its local mirror. Any document, including archived documents, blocks this operation.
Before you start
- Verify the authenticated identity, environment and pinned organization before preparing an action.
- The published application permission is workspace:delete. Discover and select a granted Compose workspace separately from action input. A supplied identifier does not grant access.
- An admin workspace grant is required for workspace archival.
- Authorize the documented effects or private-data export before CLI --confirm or MCP confirm:true. HTTP method alone does not establish a read-only operation.
Discover the target
topolo whoami --json
topolo actions get app_topolo_compose.workspaces.archive --detail --json
topolo resources topolo-compose --json
topolo workspaces list topolo-compose --json
- Select the granted workspace id as COMPOSE_WORKSPACE_ID. Use document and version ids returned by accessible reads; fixture ids confer no live access.
Request
DELETE /api/compose/workspaces/{workspaceId}
Save action input as payload.json. Inspect the plan for the exact path, query and body. Set COMPOSE_WORKSPACE_ID from granted resource discovery.
Inspect and test this action in the signed action console, then perform the verification below.
Input fields
| Field | Required | Type | Constraints |
|---|---|---|---|
workspaceId | Required | string | {"minLength":1} |
Exact input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"minLength": 1
}
},
"required": [
"workspaceId"
],
"additionalProperties": false
}
Effects
- Requires workspace:delete and an admin workspace grant.
- Checks emptiness before requesting platform archival; a platform refusal keeps the local mirror.
- On platform success removes only the local workspace mirror and returns HTTP 204 with an empty body. Canonical workspace identity remains platform-owned.
Interpret the response
HTTP 204 has an empty body and no response identifier. Retain the authorized workspaceId from the request and verify platform status.
Expect HTTP 204 with no response identifier. Read the platform workspace catalog in the same context to verify status. A local empty body alone does not describe every platform lifecycle record.
The success schema below was checked against captured handler responses. Optional structured generation metadata and integration-dependent values can vary. Error examples retain their actual refusal shapes.
Success schema:
{
"type": "string",
"const": "",
"description": "HTTP 204 with no response body; SDK transport returns exactly an empty string."
}
Worked examples
Responses were captured from the actual Compose Worker using synthetic users, organizations, content and identifiers. Tests simulate Auth, Nexus, Notify, metering and platform workspace transport and use an in-memory D1 adapter or local SQLite. They prove local handler behavior, not live model correctness, provider cost, notification delivery, real workspace grants or cross-store atomicity. HTTP 204 responses are exactly empty strings in the SDK transport. Replace fixture identifiers through credential-scoped discovery. Refused examples demonstrate boundaries and must not be executed as successful workflows.
Successful request
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: compose workspace lifecycle > an empty workspace is archived by the platform first, then dropped locally.
Input · payload.json:
{
"workspaceId": "ws_alpha"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_compose.workspaces.archive",
"input": {
"workspaceId": "ws_alpha"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 204:
HTTP 204. Expect HTTP 204 with no response identifier. Read the platform workspace catalog in the same context to verify status. A local empty body alone does not describe every platform lifecycle record.
Refused request · HTTP 403
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: compose workspace lifecycle > archival refuses any workspace but the one the platform confirmed.
Input · payload.json:
{
"workspaceId": "ws_beta"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 403:
{
"error": "forbidden"
}
HTTP 403. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Refused request · HTTP 404
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: compose workspace lifecycle > archival 404s when there is no local mirror row.
Input · payload.json:
{
"workspaceId": "ws_alpha"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 404:
{
"error": "workspace_not_found"
}
HTTP 404. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Refused request · HTTP 409
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: compose workspace lifecycle > archival refuses a workspace that still holds documents, and never asks the platform.
Input · payload.json:
{
"workspaceId": "ws_alpha"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 409:
{
"error": "workspace_not_empty"
}
HTTP 409. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Refused request · HTTP 403
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: each grant level against each route > 'DELETE' '/api/compose/workspaces/{workspaceId}' with a 'read' grant.
Input · payload.json:
{
"workspaceId": "ws_compose_test"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 403:
{
"error": "This workspace requires admin access",
"code": "workspace_access_insufficient"
}
HTTP 403. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Refused request · HTTP 409
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: compose workspace lifecycle > the platform is the authority: a refusal leaves the mirror row alone.
Input · payload.json:
{
"workspaceId": "ws_alpha"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 409:
{
"error": "workspace_archive_refused"
}
HTTP 409. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Refused request · HTTP 403
Actual Compose Worker response. Auth, Nexus, notifications, metering and platform workspace transport are simulated. D1 is an in-memory adapter or local SQLite as stated by the test. This does not prove a live model completion or notification delivery. No request credentials are captured. Captured scenario: compose workspace lifecycle > archival requires the delete permission.
Input · payload.json:
{
"workspaceId": "ws_alpha"
}
CLI:
topolo actions validate app_topolo_compose.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_compose.workspaces.archive --resource-type workspace --resource-id "$COMPOSE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 403:
{
"success": false,
"error": {
"code": "action_permission_required",
"message": "Action \"workspaces.archive\" requires permission \"workspace:delete\".",
"action": "workspaces.archive"
}
}
HTTP 403. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Verify the result
- Expect HTTP 204 with no response identifier.
- Read the platform workspace catalog in the same context to verify status. A local empty body alone does not describe every platform lifecycle record.
Errors and recovery
forbidden(HTTP 403): Verify the authenticated organization, application permission and granted workspace. For reviewer_required, use the legitimately assigned reviewer; requesting review grants no access.workspace_not_found(HTTP 404): Discover the accessible document and version in the selected workspace. A missing or inaccessible id is not permission to create a replacement.workspace_not_empty(HTTP 409): Inspect the exact conflict. A completed review cannot be decided again, and a nonempty workspace cannot be archived. Resolve state through the documented workflow.This workspace requires admin access(HTTP 403): Verify the authenticated organization, application permission and granted workspace. For reviewer_required, use the legitimately assigned reviewer; requesting review grants no access.workspace_archive_refused(HTTP 409): Inspect the exact conflict. A completed review cannot be decided again, and a nonempty workspace cannot be archived. Resolve state through the documented workflow.action_permission_required(HTTP 403): Verify the authenticated organization, application permission and granted workspace. For reviewer_required, use the legitimately assigned reviewer; requesting review grants no access.
Auth, action-input validation and platform resource resolution can refuse a request before its handler. Retain the exact error, request id and context; requesting another context is not a legitimate way to bypass a refusal.
Recovery boundary
Compose publishes no workspace restoration action. Archive documents to retain their history, but note they still block workspace archival; irreversible document deletion requires separate explicit authorization.
Related actions
- List Compose documents: List up to 200 documents created by the authenticated user in the selected authorized workspace, optionally including archived records. The read can initialize the local workspace mirror.
Evidence
Responses were captured from the actual Compose Worker using synthetic users, organizations, content and identifiers. Tests simulate Auth, Nexus, Notify, metering and platform workspace transport and use an in-memory D1 adapter or local SQLite. They prove local handler behavior, not live model correctness, provider cost, notification delivery, real workspace grants or cross-store atomicity. HTTP 204 responses are exactly empty strings in the SDK transport. Replace fixture identifiers through credential-scoped discovery. Capture digests and test scenarios are retained in the source fixture records.