Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning ELK Stack

You're reading from   Learning ELK Stack Build mesmerizing visualizations, analytics, and logs from your data using Elasticsearch, Logstash, and Kibana

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785887154
Length 206 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Saurabh Chhajed Saurabh Chhajed
Author Profile Icon Saurabh Chhajed
Saurabh Chhajed
Arrow right icon
View More author details
Toc

Exploring the Elasticsearch API


In ELK, although Logstash and Kibana act as an interface to talk to Elasticsearch indices, it's still necessary to understand how Logstash and Kibana makes use of Elasticsearch RESTful APIs to perform various operations, such as creating and managing indices, storing and retrieving the documents, and forming various types of search queries around the indices. It is also often useful to know how to delete indices.

As we already know, Elasticsearch provides an extensive API to perform various operations. The generic syntax of querying the cluster from the command line is as follows:

$curl -X<VERB> '<PROTOCOL>://<HOST>:<PORT>/<PATH>/<OPERATION_NAME>?<QUERY_STRING>' -d '<BODY>'

Let's understand various parts of this command:

  • VERB: This can take values for the request method type: GET, POST, PUT, DELETE, HEAD.

  • PROTOCOL: This is either http or https.

  • HOST: This is the hostname of the node in the cluster. For local installations...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image