4641254ea6
* Params improvements to Cluster Health API wait for shards Previously, the cluster health API used a strictly numeric value for `wait_for_active_shards`. However, with the introduction of ActiveShardCount and the removal of write consistency level for replication operations, `wait_for_active_shards` is used for write operations to represent values for ActiveShardCount. This commit moves the cluster health API's usage of `wait_for_active_shards` to be consistent with its usage in the write operation APIs. This commit also changes `wait_for_relocating_shards` from a numeric value to a simple boolean value `wait_for_no_relocating_shards` to set whether the cluster health operation should wait for all relocating shards to complete relocation. * Addresses code review comments * Don't be lenient if `wait_for_relocating_shards` is set |
||
---|---|---|
.. | ||
src/main/resources/rest-api-spec | ||
.gitignore | ||
README.markdown | ||
build.gradle |
README.markdown
Elasticsearch REST API JSON specification
This repository contains a collection of JSON files which describe the Elasticsearch HTTP API.
Their purpose is to formalize and standardize the API, to facilitate development of libraries and integrations.
Example for the "Create Index" API:
{
"indices.create": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html",
"methods": ["PUT", "POST"],
"url": {
"path": "/{index}",
"paths": ["/{index}"],
"parts": {
"index": {
"type" : "string",
"required" : true,
"description" : "The name of the index"
}
},
"params": {
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
}
}
},
"body": {
"description" : "The configuration for the index (`settings` and `mappings`)"
}
}
}
The specification contains:
- The name of the API (
indices.create
), which usually corresponds to the client calls - Link to the documentation at http://elastic.co
- List of HTTP methods for the endpoint
- URL specification: path, parts, parameters
- Whether body is allowed for the endpoint or not and its description
The methods
and url.paths
elements list all possible HTTP methods and URLs for the endpoint;
it is the responsibility of the developer to use this information for a sensible API on the target platform.
License
This software is licensed under the Apache License, version 2 ("ALv2").