Pas besoin de spécifier « curl -XGET » dans ces cas là

This commit is contained in:
Jérémy Lecour 2024-04-02 10:54:51 +02:00 committed by Jérémy Lecour
parent 097c74619f
commit f9c20802aa
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
2 changed files with 8 additions and 8 deletions

View file

@ -877,7 +877,7 @@ $ curl -H 'Content-Type: application/json' -XPUT 'http://localhost:9200/_snapsho
Pour vérifier :
~~~
$ curl -XGET 'http://localhost:9200/_snapshot/?pretty'
$ curl 'http://localhost:9200/_snapshot/?pretty'
{
"snaprepo" : {
"type" : "fs",
@ -919,7 +919,7 @@ Si l'on tente de créer un _snapshot_ déjà existant, on obtiendra :
Lister les _snapshots_ :
~~~
$ curl -XGET "localhost:9200/_snapshot/snaprepo/_all?pretty=true"
$ curl "localhost:9200/_snapshot/snaprepo/_all?pretty=true"
[...]
"snapshots" : [ {
@ -991,7 +991,7 @@ Dans le cas de _snapshot_ pour un Elasticsearch _clusterisé_ :
# else
# echo 'Cannot make a snapshot of elasticsearch, at least one node is not mounting the repository.'
# fi
# for snapshot in $(curl -s -XGET "localhost:9200/_snapshot/snaprepo/_all?pretty=true" | grep -Eo 'snapshot_[0-9]{4}-[0-9]{2}-[0-9]{2}' | head -n -10); do
# for snapshot in $(curl -s "localhost:9200/_snapshot/snaprepo/_all?pretty=true" | grep -Eo 'snapshot_[0-9]{4}-[0-9]{2}-[0-9]{2}' | head -n -10); do
# curl -s -XDELETE "localhost:9200/_snapshot/snaprepo/${snapshot}" | grep -v -Fx '{"acknowledged":true}'
# done
# date=$(date +%F)
@ -1584,13 +1584,13 @@ done
Cette commande est pratique pour voir la taille que prennent les index
~~~
$ curl -XGET "http://localhost:9200/_cat/shards?v"
$ curl "http://localhost:9200/_cat/shards?v"
~~~
### Lister le statut des index
~~~
$ curl -XGET 'http://127.0.0.1:9200/_cluster/health?level=indices&pretty'
$ curl 'http://127.0.0.1:9200/_cluster/health?level=indices&pretty'
~~~
### Relancer l'allocation des shards
@ -1640,7 +1640,7 @@ Le module propriétaire X-Pack nécessite une licence pour une utilisation avanc
$ curl -XPUT 'http://127.0.0.1:9200/_xpack/license' -H "Content-Type: application/json" -d @license.json
{"acknowledged":true,"license_status":"valid"}
$ curl -XGET 'http://127.0.0.1:9200/_xpack/license'
$ curl 'http://127.0.0.1:9200/_xpack/license'
~~~
> *Note* : si l'authentification est activée, on ajoutera l'option pour préciser un utilisateur `-u jdoe`

View file

@ -212,13 +212,13 @@ $ cat etherpad-lite/APIKEY.txt
Admettons que nous avons le pad <https://pad.evolix.org/p/monsuperpad>`monsuperpad` est le padID.
~~~
$ curl -XGET "https://pad.evolix.org/api/1.2.15/deletePad?apikey=${APIKEY}&padID=monsuperpad"
$ curl "https://pad.evolix.org/api/1.2.15/deletePad?apikey=${APIKEY}&padID=monsuperpad"
~~~
### Lister les pad
~~~
$ curl -s -XGET "https://pad.evolix.org/api/1.2.15/listAllPads?apikey=${APIKEY}"
$ curl -s "https://pad.evolix.org/api/1.2.15/listAllPads?apikey=${APIKEY}"
~~~
## FAQ