# Elastic Search Pluggable REST End point (POST)

**URL:** <https://discuss.elastic.co/t/elastic-search-pluggable-rest-end-point-post/10055>\
**Category:** Elasticsearch\
**Created:** [December 12, 2012, 6:52pm UTC](https://discuss.elastic.co/t/elastic-search-pluggable-rest-end-point-post/10055 "2012-12-12T18:52:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prasanna\_Paulraj](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@Prasanna\_Paulraj](https://discuss.elastic.co/u/Prasanna_Paulraj)\
**Post date:** [December 12, 2012, 6:52pm UTC](https://discuss.elastic.co/t/elastic-search-pluggable-rest-end-point-post/10055/1 "2012-12-12T18:52:33Z")

</div>

Hi All,

I am new to elastic search and I am trying to develop a pluggable rest end  
point. Can some one point me to some tutorial or info on how to work with  
POST request. I got some examples but they are for GET request. Couldn't  
find any thing for POST.

Thanks,  
Prasanna

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 12, 2012, 7:32pm UTC](https://discuss.elastic.co/t/elastic-search-pluggable-rest-end-point-post/10055/2 "2012-12-12T19:32:47Z")

</div>

Both Jörg Prante and I have written tutorials on the subject.

Tutorial:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Code: [GitHub - brusic/elasticsearch-hello-world-plugin: Tutorial on how to create a new REST endpoint in elasticsearch](https://github.com/brusic/elasticsearch-hello-world-plugin)

Tutorial:  
[http://jprante.github.com/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html](http://jprante.github.com/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html)  
Code: [GitHub - jprante/elasticsearch-index-termlist: Elasticsearch Index Termlist](https://github.com/jprante/elasticsearch-index-termlist)

The Action class, which is bound to the RestModule via the plugin, will  
register various action with the rest controller. Using my code as an  
example:

> <https://github.com/brusic/elasticsearch-hello-world-plugin/blob/master/src/main/java/org/elasticsearch/rest/action/helloworld/HelloWorldAction.java>

controller.registerHandler(GET, "/\_hello/", this);  
controller.registerHandler(GET, "/\_hello/{name}", this);

You would need to simply define these as POST and not GET.

Hope this helps,

Ivan

On Wed, Dec 12, 2012 at 10:52 AM, Prasanna Paulraj  
[pras.success@gmail.com](mailto:pras.success@gmail.com)wrote:

> Hi All,
> 
> I am new to Elasticsearch and I am trying to develop a pluggable rest end  
> point. Can some one point me to some tutorial or info on how to work with  
> POST request. I got some examples but they are for GET request. Couldn't  
> find any thing for POST.
> 
> Thanks,  
> Prasanna
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Alexandra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandra/32/1521_2.png) [@Alexandra](https://discuss.elastic.co/u/Alexandra)\
**Post date:** [June 3, 2014, 9:36am UTC](https://discuss.elastic.co/t/elastic-search-pluggable-rest-end-point-post/10055/3 "2014-06-03T09:36:16Z")

</div>

Hei,

I'm also trying to write a custom plugin , which can also be called straight from java with a transport client. My plugin only needs to use existing features like search, analyze ( I'm building it in order to go less to es and do everything on the server side ).

In the BaseRestHandler class I can easily access the client. But when I'm trying to build the hierarchy for the java execution ( action, request, response, builder ) I don't have access to a client which exposes to me all these actions.  
It's not clear to me which base classes should I extend in order to be able to use it. Also, I don't need to do something specific for each shard, I would like the client to handle everything.

Is it possible to do this ? Can you please point me in the right direction because I've been struggling with this for days now.

Thanks,  
Alexandra

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:25am UTC](https://discuss.elastic.co/t/elastic-search-pluggable-rest-end-point-post/10055/4 "2017-07-06T01:25:01Z")

</div>


