Delete data source
layerz_delete_integrationDisconnect a data source (API connector or file import), drop its staged transactions AND purge everything it projected into the model — its input rows, provenance tags and import entry. Items and the branch it fed are kept, emptied of its values, so a re-import can refill them. When the purge would destroy values the source cannot re-project (zero staged transactions, e.g. a materialized legacy import), the delete is refused with PURGE_CONFIRMATION_REQUIRED plus a preview of what disappears (rows, items, period span) — surface the preview to the user, then retry with confirm_purge: true to purge anyway (rollback stays possible via version restore). Not available for read-only API keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | Required: short human-readable note (3–100 chars) summarising what this change does. Shown as the label in the model version history. Be specific (e.g. "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel"). | |
| model_id | No | Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys. | |
| confirm_purge | No | Confirm a destructive purge after a PURGE_CONFIRMATION_REQUIRED refusal (values the source cannot re-project). | |
| connection_id | Yes | Connection id from layerz_list_integrations. |