Elasticsearch REST JAVA API

Elasticsearch 5 provides low-level client API’s to communicate with Elasticsearch Cluster over HTTP by JAVA. Because of REST services and JSON able to communicate with all version of Elasticseach and across firewall also.

Elasticsearch REST Client sent http requests internally by using Apache Http Async Client.

In case of version change on Elasticsearch Cluster no need to change for client and will not impact any communication.

Initial Release Version : 5.0.0-alpha4

Elasticsearch REST Features

  • Keep the connection persistent.
  • Logged request and response by Elasticsearch Rest API.
  • Load balancing across all available nodes.
  • Failover in case of node fails and upon specific response codes.
  • Provide sniffing to the discovery of clusters node.
  • Minimum Dependencies.


Elasticsearch Rest required minimum Java version is 1.7

Elasticsearch REST Java API Configuration

 Maven Configuration

Add below dependency in pom.xml file to import all library.


Gradle Configuration

Add below dependency in build.gradle file to import all library.

dependencies {   compile 'org.elasticsearch.client:rest:5.1.2'}

Read More on Elasticsearch REST


Integrate Filebeat, Kafka, Logstash, Elasticsearch and Kibana