From 6699bf7421bbaac440918d32166d2b0a5a97bcd9 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Sun, 1 Mar 2026 22:03:30 +0100 Subject: [PATCH] docs: document command-line download via config token in README --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 45f7492..08c6f27 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,31 @@ On the Config Detail page, click **Generate Config**: --- +## Command-Line Download + +Each config has a **Download Token** — a secret string that allows downloading the generated ZIP without an OIDC session. This is useful for automation scripts and CI pipelines. + +### Finding your token + +Open a config in the UI. The **Download Token** field is shown above the tabs. Click the copy icon to copy it. + +### Downloading via curl + +```bash +curl -X POST "https:///api/configs//generate?format=zip" \ + -H 'Content-Type: application/json' \ + -d '{"token": ""}' \ + -o shorewall.zip +``` + +Replace `` with the numeric ID visible in the URL when you open a config (e.g. `/configs/1`). + +### Rotating the token + +Click the **Regenerate** button (⟳) next to the token field. The old token is immediately invalidated. You will need to update any scripts that use it. + +--- + ## API Documentation FastAPI generates interactive docs automatically: