# Invoking the REST API through Java

**URL:** <https://discuss.elastic.co/t/invoking-the-rest-api-through-java/21358>\
**Category:** Elasticsearch\
**Created:** [December 22, 2014, 7:28pm UTC](https://discuss.elastic.co/t/invoking-the-rest-api-through-java/21358 "2014-12-22T19:28:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnortey](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@jnortey](https://discuss.elastic.co/u/jnortey)\
**Post date:** [December 22, 2014, 7:28pm UTC](https://discuss.elastic.co/t/invoking-the-rest-api-through-java/21358/1 "2014-12-22T19:28:43Z")

</div>

I have an elasticsearch plugin that currently does not expose a Java API. I  
can only invoke the plugin via the REST API:

[http://localhost:9200/\_myCustomPlugin](http://localhost:9200/_myCustomPlugin)

From what I understand about Elasticsearch plugins, the plugin  
implementation registers an action at the path "\_myCustomPlugin" and when  
that link is visited, the action is invoked.

Is there a way to invoke this action directly via the Java API?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/89f9b4f2-9ff4-4cc4-8aa1-089d35aa54b0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89f9b4f2-9ff4-4cc4-8aa1-089d35aa54b0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 22, 2014, 8:29pm UTC](https://discuss.elastic.co/t/invoking-the-rest-api-through-java/21358/2 "2014-12-22T20:29:12Z")

</div>

This is very few information. If you do not have the source code of the  
plugin, it is a bit hard to judge if Java calls are possible. In a plugin,  
there are not necessarily ES Java actions implemented when you can make  
REST calls.

Jörg

On Mon, Dec 22, 2014 at 8:28 PM, jnortey [jeremy.nortey@gmail.com](mailto:jeremy.nortey@gmail.com) wrote:

> I have an elasticsearch plugin that currently does not expose a Java API.  
> I can only invoke the plugin via the REST API:
> 
> [http://localhost:9200/\_myCustomPlugin](http://localhost:9200/_myCustomPlugin)
> 
> From what I understand about Elasticsearch plugins, the plugin  
> implementation registers an action at the path "\_myCustomPlugin" and when  
> that link is visited, the action is invoked.
> 
> Is there a way to invoke this action directly via the Java API?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/89f9b4f2-9ff4-4cc4-8aa1-089d35aa54b0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89f9b4f2-9ff4-4cc4-8aa1-089d35aa54b0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/89f9b4f2-9ff4-4cc4-8aa1-089d35aa54b0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/89f9b4f2-9ff4-4cc4-8aa1-089d35aa54b0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEBLrCrt1ArPnqJRhrLpZmfS1rO9k4c4gf9PtG5xGa0Yw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEBLrCrt1ArPnqJRhrLpZmfS1rO9k4c4gf9PtG5xGa0Yw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:42am UTC](https://discuss.elastic.co/t/invoking-the-rest-api-through-java/21358/3 "2017-07-06T00:42:16Z")

</div>


