Important Elastic Search Curl Commands



Important Elastic Search Curl Commands

Introduction To ELK Stack:


ELK is the abbreviation of Elasticsearch, Logstash, and Kibana. This has been known to be one of the most leading log-based management platform, which is used all over the world for log analysis.


Straight away into the ELK stack, the logstash has been extracting the logging data or full range of other events from various sources of input. It will be processing the events and hence, later on, will be storing them inside the Elasticsearch. In simple, we will be calling Kibana as a complete visualization tool, which will be accessing the logs straight from the Elasticsearch.




To learn more about Kibana. Click on this Link

To learn more about Logstash. Click on this link.

In this article, we will be looking into some of the frequently used Elastic Search Curl commands

Below is the list of most frequently used Elastic Search Curl commands.

Elastic Search Command
Purpose

To Delete index


To list all index
To query using Parameters.
curl -X GET

To list index mapping.

curl -XPUT --header 'Content-Type: application/json'

http://localhost:8200/samples/_doc/1 -d '{
   "city" : "london"                   
}
To add data
curl -XPOST --header 'Content-Type: application/json' http://localhost:8200/_reindex -d '{
  "source": {
    "index": "samples"
  },
  "dest": {
    "index": "samples_backup"
  }
}'

To take backup of index

To show health cluster
curl -X GET 'http://localhost:8200/_cat/indices?v' -u elastic:(password) '
To use basic authentication with elastic search.






SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
August 3, 2020 at 10:55 PM

Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome!
Software Testing Services
Software Testing Company
Software Testing Companies in USA
QA Testing Companies
Software Testing Services in USA

Reply
avatar