Note: I stopped maintaining this plugin since the breaking changes in the plugin model after/around version 2. I don't want to invest the time anymore keeping up with all these new changes. If you want to take over this repo to continue improving, please contact me.
Provides Swagger documentation for your Elasticsearch cluster.
Note: This plugin does not aim to be the ultimate management tool for Elasticsearch, there are far better plugins for doing this. It tries to make it easy to discover and learn about the APIs, and makes it possible to invoke/test APIs quickly.
- Runtime generation of the documentation based on the official specs, just install the plugin and go
- Automatically adapts to the version of your Elasticsearch installation. Support for Elasticsearch 0.90, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 and 2.0
- Includes a slightly modified version of Swagger UI to make it easy to switch index/alias API's
# Elasticsearch 2.2.1:
sudo ./bin/plugin install https://github.com/timschlechter/swagger-for-elasticsearch/raw/master/dist/swagger-for-elasticsearch-2.2.1.zip
# Elasticsearch 2.0:
sudo ./bin/plugin install https://github.com/timschlechter/swagger-for-elasticsearch/raw/master/dist/swagger-for-elasticsearch-2.0.0.zip
# Elasticsearch 1.7.3 and below:
./bin/plugin --url https://github.com/timschlechter/swagger-for-elasticsearch/raw/master/dist/swagger-for-elasticsearch.zip --install swagger
After you restarted the node, you can access the plugin by going to:
http:/localhost:9200/_plugin/swagger
Alternatively, you could compile and install the plugin yourself. See the documentation on plugins for more information.
Clone this repo:
git clone https://github.com/timschlechter/swagger-for-elasticsearch.git
This plugin uses the sources of some submodules to keep in sync with the official spec files and swagger-ui. The spec files are in the main Elasticsearch repo, so we have to pull in every version of Elasticsearch we would like to support. I don't have a better way to do this, so:
cd swagger-for-elasticsearch
git submodule init
git submodule update
...and grab youself a cup of coffee. If someone has a suggestion to make this easier, please contact me :-)
mvn package
This will
- generate the release package in
/target/releases
- put the Swagger UI in
/target/elasticsearch/plugins/swagger/_site
so it can be used during debugging