summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBrad Kollmyer <bradk@vitalsoft.com>2026-07-14 13:49:22 -0700
committerBrad Kollmyer <bradk@vitalsoft.com>2026-07-14 13:49:22 -0700
commitca902d4eebd49697f476d538eadfcaeb8ebb2232 (patch)
tree64d84ae0223611777aa5ef38c8c5045d438483a0 /docs
parent0b88b491d043e5f281d8e3ae499c4d045da28f28 (diff)
downloadvyos-documentation-ca902d4eebd49697f476d538eadfcaeb8ebb2232.tar.gz
vyos-documentation-ca902d4eebd49697f476d538eadfcaeb8ebb2232.zip
vyos-api: T9088: document /show configuration commands export
The /show endpoint can return the running config as flat set commands (op-mode 'show configuration commands' equivalent) — the natural way to mirror or back up a router over the API; previously undocumented. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/automation/vyos-api.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/automation/vyos-api.md b/docs/automation/vyos-api.md
index 383b8311..1c51cc01 100644
--- a/docs/automation/vyos-api.md
+++ b/docs/automation/vyos-api.md
@@ -381,6 +381,27 @@ response:
}
```
+The endpoint can also export the running configuration as flat `set`
+commands, equivalent to the operational mode command
+`show configuration commands`. This is convenient for mirroring, diffing,
+or backing up a configuration:
+
+```none
+curl -k --location --request POST 'https://vyos/show' \
+--form data='{"op": "show", "path": ["configuration", "commands"]}' \
+--form key='MY-HTTPS-API-PLAINTEXT-KEY'
+
+response (shortened):
+{
+ "success": true,
+ "data": "set interfaces ethernet eth0 address 'dhcp'\n
+ set interfaces ethernet eth0 hw-id '50:00:00:01:00:00'\n
+ set system host-name 'vyos'\n
+ ...",
+ "error": null
+}
+```
+
### /generate