provides an API gateway and control plane for Elasticsearch - with a mission of powering the most demanding application search use-cases.

To get started with the APIs, the first pre-requisite is to create an cluster. You can do this by creating a cluster using the cloud service, or bring your existing Elasticsearch cluster, or self-host

REST APIs maintains a 100% API compatibility with Elasticsearch. Any Elasticsearch REST API will work as is when using The primary set of Elasticsearch APIs that would be relevant are:

  1. Index (read collections) APIs and document (read data) APIs
  2. Search APIs: Querying data

Besides this, takes an API-first approach for all of the value-added features and also makes this available with a separate gateway. These features include:

  1. ReactiveSearch API - A alternative API to query Elasticsearch declaratively. This is the recommended way to query via web and mobile apps as it prevents query injection attacks. It also composes well with Elasticsearch's query DSL and allows utilizing additional features like query rules.
  2. Features APIs - All of the value-add features like search relevance, caching, query rules, actionable analytics, access control, UI builder are available as APIs. Everything that one can do from dashboard is achievable with these APIs.

Elasticsearch and API gateways Image: dashboard view provides both Elasticsearch and gateway endpoints separately

Elasticsearch API: Quickstart

In this section, we will look at the basics of using the Elasticsearch APIs: creating an index, indexing data into this index, and searching on this index.

Think of the index as a collection in .

Creating an Index

This gif shows how to create an index on cluster, which we will need for this quickstart guide.

For this tutorial, we will use an index called good-books-demo. The credentials for this index are 376aa692e5ab:8472bf31-b18a-454d-bd39-257c07d02854.

Note uses HTTP Basic Auth, a widely used protocol for simple username/password authentication. It also support creating various API credentials with different access. You can read more about access control in docs.


Here's an example authenticated GET request. We will set the app name and credentials as bash variables and reuse them in the requests.


curl https://$credentials@$url/$index

  "good-books-demo": {
   "mappings": {
    // properties / fields

Indexing Data

Let's insert a JSON object. We add a JSON document 1 with a PUT request.

curl -XPUT https://$credentials@$url/$index/_doc/1 -d '{
 "name":"A Fake Book on Network Routing",

GET Data

Retrieves the specified JSON document from an index.

curl -N https://$credentials@$url/$index/_doc/1

 "_index": "app`248",
 "_type": "books",
 "_id": "1",
 "_version": 5,
 "found": true,
 "_source": {
  "department_name": "Books",
  "department_name_analyzed": "Books",
  "department_id": 1,
  "name": "A Fake Book on Network Routing",
  "price": 5595

Returns search hits that match the query DSL defined in the request. Read more about search API here.

We will see it here with a match_all query request.

curl -N -XPOST https://$credentials@$url/$index/_search -d '{"query": {"match_all":{}}}'

 "took": 1,
 "timed_out": false,
 "_shards": {
  "total": 1,
  "successful": 1,
  "failed": 0
 "hits": {
  "total": 1,
  "max_score": 1,
  "hits": [{
   "_index": "app`248",
   "_type": "books",
   "_id": "1",
   "_score": 1,
   "_source": {
    "price": 6034,
    "department_name": "Books",
    "department_name_analyzed": "Books",
    "department_id": 1,
    "name": "A Fake Book on Network Routing"

ReactiveSearch API: Overview

ReactiveSearch API derives its name from ReactiveSearch, a declarative UI library for building search interfaces. ReactiveSearch extends this ability in a client/framework agnostic manner.

Here's a basic example showing the use of ReactiveSearch API to query Elasticsearch.

You can view more examples on our interactive examples page.

You can learn the concepts behind ReactiveSearch API over here, or view the API reference over here.