Docs · Operate
Restoring a folder
POST /v1/lw-<team>/restore/<folder>/ with {"as_of": "<RFC 3339 time>"} previews; add "dry_run": false to apply. It covers the secrets directly in the folder (not subfolders), up to 500.
# what restoring prod/ as of 09:00 would change: names and versions, never values
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/restore/prod/" \
-d '{"as_of": "2026-12-05T09:00:00Z"}' | jq .data
# then apply it: each secret's version from then comes back as a new version, nothing destroyed
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/restore/prod/" \
-d '{"as_of": "2026-12-05T09:00:00Z", "dry_run": false}'| Outcome | Meaning |
|---|---|
| restore | The version current then comes back as a new version (check-and-set against the current one) |
| delete | Made since then: its current version is soft-deleted (undelete brings it back) |
| unchanged | It holds what it held then |
| lost | The version it had then was destroyed, or trimmed past max_versions |
Previewing needs read on the folder; applying needs write. Nothing is destroyed, so a restore is undone by restoring to just before it.