Article Image Article Image Commonly used Elasticsearch REST APIs at work Blog Logo Arun Varghese on 13 May 2020 , tagged on elasticsearch, rest-api read Helpful Elasticsearch APIs This is a simple post listing the Elasticsearch rest APIs that I use most at work. List all indices curl "localhost:9200/_cat/indices" List all shards curl "localhost:9200/_cat/shards" List all elasticserach nodes curl "localhost:9200/_nodes?pretty" curl "localhost:9200/_cluster/allocation/explain?pretty" curl -s 'localhost:9200/_cat/allocation?v' curl -XPOST localhost:9200/_cluster/reroute?retry_failed=true curl -X POST localhost:9200/_reindex \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "source": { "index": "<<index_old_ones_with_data>>", "query": { "match_all": {} } }, "dest": { "index": "<<new_index_with_new_mapping>>" } }' curl -X POST localhost:9200/_reindex \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "source": { "remote": { "host": "http://<some-ip>:9200" }, "index": "<<index_old_ones_with_data>>", "query": { "match_all": {} } }, "dest": { "index": "<<new_index_with_new_mapping>>" } }' curl -X POST "localhost:9200/<index_name>/_search?pretty" -H 'Content-Type: application/json' -d' { "query": { "match": { "<field>": "<field-value>" } } } ' curl -X POST "localhost:9200/<index_name>/_delete_by_query?pretty" -H 'Content-Type: application/json' -d' { "query": { "match": { "<field>": "<field-value>" } } } ' PS: I will add description for each soon Written by Blog Logo Arun Varghese Published 13 May 2020 Supported by Please enable JavaScript to view the comments powered by Disqus.