Skip to content

delete_bsheet

Archive or restore a generated output view with lifecycle_action=‘archive’ or ‘restore’ and expected_updated_at from list_bsheets or get_bsheet. This is reversible, requires Editor access, and retains the original Git document, identity, and provenance. Or permanently delete a native sheet with the default lifecycle_action=‘delete’.

destructive

Name Type Required Default Description
model_name string Yes — Name of the Bridge Town model that owns the sheet.
sheet_id string Yes — sheet_id of the native sheet to delete, as returned by list_bsheets or get_bsheet. Works for both input sheets and output sheet views.
lifecycle_action one of: delete, archive, restore No 'delete' Choose ‘archive’ or ‘restore’ for reversible output-view lifecycle. The default ‘delete’ remains the permanent, owner-confirmed Git delete.
expected_updated_at string (date and time) No None Required for archive/restore: updated_at returned by list_bsheets or get_bsheet. A repeated request already in the requested state is idempotent.
branch string No None Branch the sheet lives on. Defaults to the model’s default/unresolved branch – never the most-recently-updated row across branches; the default branch’s own literal name (e.g. ‘main’) resolves to that same row. Pass the exact branch to scope a scenario branch’s sheet; deleting on one branch never affects another branch’s copy of the same sheet_id.
dry_run boolean No True When true, simulate the deletion and return what would be removed without mutating anything. Defaults to true.
confirmation_token string No None Token required to confirm deletion (returned by a dry run).
expected_sha string No None Optional blob SHA-1 (from get_bsheet/list_bsheets) to guard against deleting a sheet that was changed since you last read it. Omit to delete regardless of the sheet’s current content.
workspace_id string No None

Returns a structured object. Top-level fields:

  • model_name (string)
  • sheet_id (string)
  • name (string)
  • purpose (string)
  • branch (null)
  • repo_path (string)
  • latest_commit_sha (string)
  • attached_model (string)
  • dependency_count (integer)
  • deleted (boolean)

See the response example below for the full payload shape.

{
"name": "delete_bsheet",
"arguments": {
"model_name": "forecasts",
"sheet_id": "assumptions",
"dry_run": false,
"confirmation_token": "eyJleHAiOjE3NDU4...b64.9f2b1c4d"
}
}
{
"model_name": "forecasts",
"sheet_id": "assumptions",
"name": "Assumptions",
"purpose": "input",
"branch": null,
"repo_path": "sheets/assumptions.btsheet.json",
"latest_commit_sha": "abc1234def5678901234567890abcdef12345678",
"attached_model": "revenue",
"dependency_count": 1,
"deleted": true
}
  • Module: BSheets
  • Requires an authenticated Bridge Town session (OAuth) or an API token.