docs: Use .snap extension in API snapshot save/restore

Change the `.tgz` file extension in the snapshot save and restore
examples on /api-docs/snapshot to `.snap`.

This is consistent with the file extension used in other example
snapshot save and restore commands, as well as the default extension
used by the Consul Snapshot Agent.
This commit is contained in:
David Roca 2022-05-27 17:07:37 -04:00 committed by GitHub
parent ead8e4a200
commit 357fe1c080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -61,10 +61,10 @@ The corresponding CLI command is [`consul snapshot save`](/commands/snapshot/sav
With a custom datacenter:
```shell-session
$ curl http://127.0.0.1:8500/v1/snapshot?dc=my-datacenter --output snapshot.tgz
$ curl http://127.0.0.1:8500/v1/snapshot?dc=my-datacenter --output snapshot.snap
```
The above example results in a tarball named `snapshot.tgz` in the current working directory.
The above example results in a tarball named `snapshot.snap` in the current working directory.
In addition to the Consul standard stale-related headers, the `X-Consul-Index`
header will contain the index at which the snapshot took place.
@ -110,7 +110,7 @@ call to [generate snapshot](#generate-snapshot).
```shell-session
$ curl \
--request PUT \
--data-binary @snapshot.tgz \
--data-binary @snapshot.snap \
http://127.0.0.1:8500/v1/snapshot
```