data.connection.prune_dns ​
Soft-delete DNS zones/records that no longer exist on the provider
Soft-delete DnsZone/DnsRecord rows whose provider IDs are no longer listed.
Input: organization_uuid, connection_uuid, optional prune_records (default True). Output in state_data: connection_uuid, zones_pruned, records_pruned, pruned_at; or sync_skipped=True + sync_reason when preconditions are not met.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-connection |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization that owns the connection |
connection_uuid | uuid | Yes | — | UUID of the connection whose orphan zones/records should be pruned |
prune_records | boolean | No | — | Whether to also prune orphan records inside surviving zones (default True) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | UUID of the connection that was pruned |
zones_pruned | integer | No | — | Number of zones soft-deleted |
records_pruned | integer | No | — | Number of records soft-deleted |
pruned_at | string | No | — | ISO-8601 timestamp of the prune |
truncated | boolean | No | — | True when the run hit MAX_ZONES / MAX_RECORDS_PER_ZONE and stopped early |
sync_skipped | boolean | No | — | True when prune was skipped (no plugin / non-DNS provider / etc.) |
sync_reason | string | No | — | Why prune was skipped, when applicable |
failure_reason | string | No | — | Engine-stamped: human-readable failure reason |
failure_type | string | No | — | Engine-stamped: failure category |
failed_action | string | No | — | Engine-stamped: action method that raised |
failed_at_state | string | No | — | Engine-stamped: state name when the failure occurred |
failed_step | string | No | — | Engine-stamped: name of the step that failed (DAG workflows) |
failed_layer | integer | No | — | Engine-stamped: layer index that failed (DAG workflows) |
error | string | No | — | Engine-stamped: error message on the failure envelope |
error_type | string | No | — | Engine-stamped: exception class name on the failure envelope |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Prune DNS |
completed | No | Yes | Yes | — | Prune complete |
failed | No | Yes | No | — | Prune failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.connection.prune_dns",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value"
}
}