load_config
Replace Caddy's full running config with a new one, offering dry-run preview and undo via snapshot of the prior config.
Instructions
[WRITE][risk=high] Replace caddy's FULL running config; reversible — the prior config is snapshotted first and the undo re-loads it.
Pass dry_run=True to preview.
Refuses a config that disables the admin API or moves admin.listen off the configured base_url — the undo re-POSTs the snapshot over that same API. Send the admin block unchanged, or omit it. The refusal applies under dry_run too, which must report it rather than preview a refused call.
Args: config: The full config tree to load (a JSON object). dry_run: If True, preview without loading. target: Proxy target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | ||
| target | No | ||
| dry_run | No |