Elasticsearch APIs
There are many APIs available for managing Elasticsearch. These APIs help us to manage cluster, indices, search, and so on. In this section, we will look at each of these APIs in detail.
We can use these APIs through Command Prompt, Console in Kibana, or any tool that can make calls to RESTful APIs.
Note
By default, Elasticsearch runs on port 9200
to listen to HTTP requests. Kibana uses the same port to connect to Elasticsearch. To learn more about Console, refer to Chapter 4, Kibana Interface, Exploring Dev tools section.
Sense is a powerful plugin for Kibana that allows us to make calls to Elasticsearch APIs using a web interface. We will be learning about Sense in Chapter 8, Elasticsearch APIs. For this chapter, we will be using cURL, a Command Prompt utility that allows us to access HTTP requests to access the APIs.
A typical cURL request against ES contains a verb, URL, and message body:
$ curl -X{Verb} 'url' -d '{message-body}'
Verbs are GET
, PUT
, POST
, DELETE
, and HEAD...