Outcome
Archive an empty Docs workspace and purge its archived Docs data.
These examples were captured from the local Worker. Deployment, publication and retrieval are verified separately for each environment; local examples do not establish external provider delivery.
Before you start
-
Inspect the credential identity with topolo whoami and the exact action with topolo actions get before preparing input.
-
Discover an accessible Docs workspace with topolo resources topolo-docs and topolo workspaces list topolo-docs. Pass workspace resource type and identifier separately from action input.
-
The published required permission is workspace:delete; the active credential and resource binding must authorize the call.
-
Validate and plan the exact request. Execute only after the intended effect has been authorized; --confirm is the transport guard, not a grant of permission.
-
Use a dedicated, empty workspace. Read spaces.list and documents.list before planning; active records cause workspace_not_empty. Export any archived material that must be retained before a purge.
Discover the target
topolo actions get app_topolo_docs.workspaces.archive --detail --json
topolo resources topolo-docs --json
topolo workspaces list topolo-docs --json
Input fields
| Field | Required | Meaning |
|---|---|---|
workspaceId | Yes | Auth-owned Docs workspace resource identifier to archive. It must equal the selected workspace, be accessible to the caller and contain no active spaces or documents. |
Interpret the response
ok and workspaceId acknowledge the approved archive and purge. This does not describe a reversible soft delete: archived Docs data in this empty workspace is purged after Auth accepts the archive.
Worked examples
The following inputs and responses were captured from the local Docs worker fixture. Auth and Nexus dependencies are simulated. Identifiers, URLs and timestamps are illustrative fixture values. Discover your own identifiers and choose an appropriate test resource; copying a fixture identifier does not make it valid in your environment. For workspace-bound calls, set DOCS_WORKSPACE_ID to the identifier returned by resource discovery. Run validation and planning first; the final call requires the intended effect to be authorized.
Minimal example
Save the input as payload.json:
{
"workspaceId": "ws_empty"
}
CLI:
topolo actions validate app_topolo_docs.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_docs.workspaces.archive --resource-type workspace --resource-id "$DOCS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_docs.workspaces.archive --resource-type workspace --resource-id "$DOCS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_docs.workspaces.archive",
"input": {
"workspaceId": "ws_empty"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"ok": true,
"workspaceId": "ws_empty"
}
ok and workspaceId acknowledge the approved archive and purge. This does not describe a reversible soft delete: archived Docs data in this empty workspace is purged after Auth accepts the archive.
Workflow example
Save the input as payload.json:
{
"workspaceId": "ws_empty"
}
CLI:
topolo actions validate app_topolo_docs.workspaces.archive --data @payload.json --json
topolo actions plan app_topolo_docs.workspaces.archive --resource-type workspace --resource-id "$DOCS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_docs.workspaces.archive --resource-type workspace --resource-id "$DOCS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_docs.workspaces.archive",
"input": {
"workspaceId": "ws_empty"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"ok": true,
"workspaceId": "ws_empty"
}
ok and workspaceId acknowledge the approved archive and purge. This does not describe a reversible soft delete: archived Docs data in this empty workspace is purged after Auth accepts the archive.
Verify the result
- Confirm the workspace no longer resolves through workspace.get.
Errors and recovery
-
HTTP 403 ·
organization_required: The token carries no organization scope. Re-authenticate against the organization that owns the Docs workspace and retry. -
HTTP 403 ·
permission_denied: The credential needs workspace:delete on the selected Docs workspace. -
HTTP 409 ·
workspace_not_empty: The workspace still holds active Docs records. Archive its spaces with spaces.archive first, then retry. -
HTTP 409 ·
workspace_archive_refused: The platform refused the archive, usually because another app still holds records in the same workspace. Resolve that app first, then retry.
Captured local refusal · HTTP 409
{
"input": {
"workspaceId": "ws_fixture"
},
"response": {
"error": "workspace_not_empty"
}
}
Captured local refusal · HTTP 409
{
"input": {
"workspaceId": "ws_fixture"
},
"response": {
"error": "workspace_not_empty"
}
}
This PURGES the archived Docs data, so the immutable versions in that workspace are destroyed rather than retained. Take workspace.export first if any of it matters.
Evidence boundary
These examples establish local handler behavior and schema validity. They do not establish runtime permission parity, a deployed development/staging result or production completion. Preserve the actual request identifier and perform the verification reads after an authorized live call.