Topolo Docs Topolo Platform
Open workspace

Delete workspace — Calendar

Archive an empty verified workspace through Auth and remove its local mirror.

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

FieldPresenceDeclared constraintMeaning
workspaceIdrequiredstringThe 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.
  1. 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.

HTTPErrorSupported response
403forbiddenReconcile the declared permission, organization and verified resource grant with the legitimate access owner; do not switch context to bypass a refusal.
403workspace_forbiddenMatch workspaceId to the verified selected workspace.
409workspace_not_emptyPreserve the workspace and ask its data owner to resolve legitimate retirement requirements.
502workspace_archive_refusedReconcile 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.

  • 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.