Skip to content

delete_data_source_snapshot

Delete one unreferenced, non-current snapshot generation identified by its opaque snapshot_id (from list_data_source_snapshots). Never accepts a raw S3 prefix — ownership (tenant/model/source) is re-verified server-side. Refuses to delete the current snapshot or one referenced by a model run. This operation is irreversible; calling it again on an already-deleted snapshot is idempotent (no error).

destructive

NameTypeRequiredDefaultDescription
model_nameAnnotated[str, Field(description='Name of the Bridge Town model.')]Yes
data_source_idAnnotated[str, Field(description='Data source ID, as returned by list_data_sources.')]Yes
snapshot_idAnnotated[str, Field(description='Opaque snapshot ID, as returned by list_data_source_snapshots.')]Yes
workspace_id`Annotated[strNone, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]`NoNone

Returns a structured object. Top-level fields:

  • model_name (string)
  • data_source_id (string)
  • snapshot_id (string)
  • status (string)
  • already_deleted (boolean)
  • deleted_count (integer)
  • message (string)
  • workspace_id (string)

See the response example below for the full payload shape.

{
"name": "delete_data_source_snapshot",
"arguments": {
"model_name": "forecasts",
"data_source_id": "6e00ea4c-239d-4ac8-a3eb-ceedca558c78",
"snapshot_id": "20f6e5b1-ca46-44e2-9134-2dc8db53ebf7"
}
}
{
"model_name": "forecasts",
"data_source_id": "6e00ea4c-239d-4ac8-a3eb-ceedca558c78",
"snapshot_id": "20f6e5b1-ca46-44e2-9134-2dc8db53ebf7",
"status": "deleted",
"already_deleted": false,
"deleted_count": 1,
"message": "Snapshot '20f6e5b1-ca46-44e2-9134-2dc8db53ebf7' deleted (1 object(s)).",
"workspace_id": "6e00ea4c-239d-4ac8-a3eb-ceedca558c78"
}
  • Module: Data
  • Requires authentication via API token or Auth0 JWT.