Archive an empty verified workspace through Auth and remove its local mirror.
Action: app_topolo_calendar.workspaces.delete · DELETE /api/workspaces/{workspaceId}
Declared permission: app_topolo_calendar.workspace:delete. For authorized Calendar users; permissions and resource access still apply.
Before you start
- Use the current credential to confirm the production organization and inspect this exact action before preparing a call.
- Declared permission: app_topolo_calendar.workspace:delete. Permission discovery is not a grant.
- Discover the authorized Calendar workspace and pass it as resourceType=workspace/resourceId separately from this action input. Calendar records and IDs are scoped to the selected host/workspace.
- Validate and plan the exact payload, obtain effect-specific authorization, then execute unchanged only in a separately authorized operational task. Do not run these synthetic inputs.
Inputs and field meanings
| Field | Presence | Declared constraint | Meaning |
|---|---|---|---|
workspaceId | required | string | The same Calendar workspace verified in resource context. This input is not permission to target another workspace. |
Worked request and response
Source-reviewed illustration only. Nothing below was executed; all identifiers, counts, states, credentials and URLs are synthetic. Replace identifiers through discovery before any separately authorized call.
Resource context: workspace; it is not an extra action input field.
Illustrative action input:
{
"workspaceId": "ws_calendar_example"
}
Illustrative HTTP 204 source response:
No response body.
HTTP 204 has no response body; do not parse it as JSON or invent a success object. The source asks Auth to archive before dropping the local mirror. The declared object output schema cannot describe this empty response.
The reviewed source returns HTTP 204 with no body; the declared object output schema does not model that response.
Effects and verification
- Requires the exact verified workspace and an empty local domain scope.
- Delegates archival to Auth, then removes the local mirror; it is not a general domain-data erase.
- Use supported Auth workspace discovery to confirm archival/absence, preserving the original organization/workspace context and any refusal evidence.
Refusals and recovery
Selected source refusals are listed below; runtime middleware can return additional structured errors.
| HTTP | Error | Supported response |
|---|---|---|
| 403 | forbidden | Reconcile the declared permission, organization and verified resource grant with the legitimate access owner; do not switch context to bypass a refusal. |
| 403 | workspace_forbidden | Match workspaceId to the verified selected workspace. |
| 409 | workspace_not_empty | Preserve the workspace and ask its data owner to resolve legitimate retirement requirements. |
| 502 | workspace_archive_refused | Reconcile the Auth refusal and local mirror; do not retry deletion blindly. |
Recovery: Calendar exposes no workspace restore action. An Auth-owned recovery decision, if available, is separate authority; do not delete domain data to bypass the nonempty guard.
After an uncertain mutation, reconcile the named records and provider/delivery evidence before repeating it.
Related actions
app_topolo_calendar.host.get: Read the selected workspace host, including the unconfigured host:null state.
Declared schemas and provenance
The hidden action guide carries these exact current declared schemas. They are not rewritten to make the illustrations pass.
Input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"minLength": 1
}
},
"required": [
"workspaceId"
],
"additionalProperties": false
}
Output schema:
{
"type": "object",
"title": "Delete workspace response",
"description": "Operation result returned by workspaces.delete.",
"properties": {
"success": {
"type": "boolean"
},
"id": {
"type": "string"
},
"data": {
"oneOf": [
{
"type": "object",
"title": "workspace record",
"properties": {
"id": {
"type": "string",
"description": "Stable identifier when the workspace exposes one."
}
},
"additionalProperties": true
},
{
"type": "object",
"additionalProperties": true
}
]
},
"result": {
"type": "object",
"additionalProperties": true
},
"message": {
"type": "string"
}
},
"additionalProperties": true,
"x-topolo-contract-source": "derived-action-metadata",
"x-topolo-contract-precision": "structural"
}
Source: TopoloCalendar@b378ceb73800ee1d1e6c4ff6f0b4179918cf632c, apps/api/src/routes/workspaces.ts. Current catalog metadata and source were compared without executing the application.
- Source-reviewed synthetic input/response; not captured or executed.
- Source revision is not proof of current deployment, caller access, provider connection or notification delivery.
- The reviewed source returns HTTP 204 with no body; the declared object output schema does not model that response.