All Products
Search
Document Center

Elasticsearch:Restful API

Last Updated:Mar 26, 2026

Alibaba Cloud Elasticsearch supports open source Elasticsearch RESTful APIs over HTTP, giving you access to document operations, index management, and alias configuration through standard HTTP requests.

Access methods

Elasticsearch accepts requests on port 9200 over HTTP. TCP access is also supported. The following access methods are available:

Method Description When to use
curl Send HTTP requests directly from the command line Quick testing, scripting, CI pipelines
Java REST client Official Elasticsearch Java client Java applications (recommended)
Java API (Transport Client) Legacy Java client based on TCP transport Existing codebases on Elasticsearch 5.x or 6.x only

Call the API with curl

Send requests to your cluster's internal or public endpoint on port 9200. For request parameters and runnable examples, see Use curl commands and API operations to manage an Alibaba Cloud Elasticsearch cluster.

Connect with a Java client

Java REST client (recommended)

Use the Java REST client provided by open source Elasticsearch. The client version must match the Elasticsearch version of your cluster. A version mismatch causes the client to fail to identify the cluster.

For an overview of Java client options and compatibility, see Java client overview.

Java API (Transport Client)

Alibaba Cloud Elasticsearch comes with both Transport Client and the Java REST client pre-installed. Transport Client is deprecated as of Elasticsearch 7.0 and removed in Elasticsearch 8.0.

For Java API reference documentation, see Java API.

Document APIs

Document APIs operate on individual or multiple documents. For batch operations, use multi-document APIs whenever practical.

Single-document APIs

API Description
Index API Create or replace a document in an index
Get API Retrieve a document by ID
Delete API Delete a document by ID
Update API Partially update a document

Multi-document APIs

API Description
Multi Get API Retrieve multiple documents by ID in a single request
Bulk API Index, update, or delete multiple documents in a single request
Delete By Query API Delete all documents matching a query
Update By Query API Update all documents matching a query
Reindex API Copy documents from one index to another