Outcome
Require the exact platform-granted workspace and existing local mirror, refuse any data in six Success content tables, then request canonical Auth archival and remove the local mirror. HTTP 204 has an empty body.
Before you start
- Verify the authenticated identity, exact environment and pinned approved organization context before preparing an action.
- The published application permission is workspace:delete. Discover a granted Success workspace and bind that exact resource. Supplied identifiers do not grant access.
- Authorize the documented mirror, notification, metering, privacy or archival effects before CLI --confirm or MCP confirm:true. A GET request can initialize a local mirror.
Discover the target
topolo whoami --json
topolo actions get app_topolo_success.workspaces.delete --detail --json
topolo resources topolo-success --json
topolo workspaces list topolo-success --json
- Select the exact granted workspace id as SUCCESS_WORKSPACE_ID. Fixture ids authorize no live operation.
Request
DELETE /api/workspaces/{workspaceId}
Save action input as payload.json. Inspect the plan for the exact path, query and body. Set SUCCESS_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 | Exact app-scoped workspace id returned by granted resource discovery; the separate workspace resource binding must match.; {"minLength":1} |
Exact input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"minLength": 1,
"description": "Exact app-scoped workspace id returned by granted resource discovery; the separate workspace resource binding must match."
}
},
"required": [
"workspaceId"
],
"additionalProperties": false
}
Effects
- Counts accounts, score history, risks, milestones, tasks and notification outbox, including sent rows; any nonzero count refuses archival. Renewal rows are account-linked and excluded from the six direct counts.
- After Auth accepts archival, deletes the local mirror. Canonical archival and local removal are sequential, with no cross-service transaction; a later failure can leave the canonical workspace archived and mirror present.
Interpret the response
HTTP 204 has no identifier. Use the already discovered and authorized input.workspaceId for separate canonical verification.
HTTP 204 contains no workspaceId; the SDK output is an empty string. The target id comes from reviewed input, not a response identifier. Read Auth-owned workspace discovery for topolo-success to verify canonical status. Missing local mirror is a 404, not standalone proof of canonical archive success.
The success schema below was checked against captured handler responses. Delegated Auth profile fields and sanitized notification payload fields can vary; exact outer envelopes and SQL row fields are source-reviewed. Error examples retain their actual refusal shapes.
Success schema:
{
"type": "string",
"const": "",
"description": "HTTP 204 has no body; the SDK represents the empty response as an empty string."
}
Worked examples
Actual exported Worker responses captured with real local SQLite D1 and all committed migrations, synthetic Auth identity/grants, simulated Notify/Nexus and canonical archive transport. Fixture ids are examples only. No live notification delivery, metering acceptance, privacy erasure, workspace archive or deployment is established by these tests. Refused examples demonstrate boundaries and must not be executed as successful workflows.
Refused request · HTTP 404
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: removed local mirror cannot archive again.
Input · payload.json:
{
"workspaceId": "ws_success_fixture"
}
CLI:
topolo actions validate app_topolo_success.workspaces.delete --data @payload.json --json
topolo actions plan app_topolo_success.workspaces.delete --resource-type workspace --resource-id "$SUCCESS_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.
Successful request
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: empty archive returns no HTTP body.
Input · payload.json:
{
"workspaceId": "ws_success_fixture"
}
CLI:
topolo actions validate app_topolo_success.workspaces.delete --data @payload.json --json
topolo actions plan app_topolo_success.workspaces.delete --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_success.workspaces.delete --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_success.workspaces.delete",
"input": {
"workspaceId": "ws_success_fixture"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 204:
HTTP 204. HTTP 204 contains no workspaceId; the SDK output is an empty string. The target id comes from reviewed input, not a response identifier. Read Auth-owned workspace discovery for topolo-success to verify canonical status. Missing local mirror is a 404, not standalone proof of canonical archive success.
Refused request · HTTP 409
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: Auth refuses archive.
Input · payload.json:
{
"workspaceId": "ws_success_fixture"
}
CLI:
topolo actions validate app_topolo_success.workspaces.delete --data @payload.json --json
topolo actions plan app_topolo_success.workspaces.delete --resource-type workspace --resource-id "$SUCCESS_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 409
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: nonempty workspace remains.
Input · payload.json:
{
"workspaceId": "ws_success_fixture"
}
CLI:
topolo actions validate app_topolo_success.workspaces.delete --data @payload.json --json
topolo actions plan app_topolo_success.workspaces.delete --resource-type workspace --resource-id "$SUCCESS_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.
Verify the result
- HTTP 204 contains no workspaceId; the SDK output is an empty string. The target id comes from reviewed input, not a response identifier.
- Read Auth-owned workspace discovery for topolo-success to verify canonical status. Missing local mirror is a 404, not standalone proof of canonical archive success.
Errors and recovery
invalid_action_input(HTTP 400): Correct only the input paths reported by the runtime or CLI validator; retain action id and exact context.action_permission_required(HTTP 403): The verified credential lacks the action permission. Stop this action and request the appropriate authorized grant; an identifier or organization ownership does not grant it.organization_required(HTTP 403): Verify the authorized organization context; personal scope cannot operate on organization-owned Success data.workspace_required(HTTP 400): Discover an authorized app-scoped workspace and pass its resource binding. API keys without a workspace resource are refused.workspaces_unavailable(HTTP 503): Preserve the request id and report unavailable platform grants or database binding; do not invent a default workspace.forbidden(HTTP 403): The verified resource workspace must exactly match workspaceId in the path.workspace_not_found(HTTP 404): No organization-owned local mirror exists. Check canonical workspace status; do not infer archive success from this error.workspace_not_empty(HTTP 409): The six local content tables must be empty, including historical and sent notification rows. Do not erase organization data merely to enable archive.workspace_archive_refused(HTTP 409): Auth refused canonical archival. Preserve the request id and review canonical policy; the local mirror remains.workspace_archive_refused(HTTP 502): The Auth archive call failed. Verify canonical state before any replay; preserve the exact refusal.
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
No published Success unarchive or mirror-only repair action exists. An ambiguous result requires authorized canonical workspace read-back and operator recovery; do not recreate a guessed identity.
Evidence
Actual exported Worker responses captured with real local SQLite D1 and all committed migrations, synthetic Auth identity/grants, simulated Notify/Nexus and canonical archive transport. Fixture ids are examples only. No live notification delivery, metering acceptance, privacy erasure, workspace archive or deployment is established by these tests. Capture digests and test scenarios are retained in the source fixture records.