# Rest api in elasticsearch plugin

**URL:** <https://discuss.elastic.co/t/rest-api-in-elasticsearch-plugin/223761>\
**Category:** Elasticsearch\
**Created:** [March 16, 2020, 1:07pm UTC](https://discuss.elastic.co/t/rest-api-in-elasticsearch-plugin/223761 "2020-03-16T13:07:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bengagi\_Foued](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bengagi_foued/32/61961_2.png) [@Bengagi\_Foued](https://discuss.elastic.co/u/Bengagi_Foued)\
**Post date:** [March 16, 2020, 1:07pm UTC](https://discuss.elastic.co/t/rest-api-in-elasticsearch-plugin/223761/1 "2020-03-16T13:07:58Z")

</div>

i just created an elasticsearch plugin which exports GIS reports every day at 00:00 , now i'd like to add a button in my UI to invoke the report creation on demand  
my question, is it possible to expose a rest api in this plugin wichi my UI invoke for report creation ?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 16, 2020, 1:57pm UTC](https://discuss.elastic.co/t/rest-api-in-elasticsearch-plugin/223761/2 "2020-03-16T13:57:21Z")

</div>

See [https://github.com/elastic/elasticsearch/tree/master/plugins/examples/rest-handler](https://github.com/elastic/elasticsearch/tree/master/plugins/examples/rest-handler) as an example of how to write an Elasticsearch plugin that registers a REST handler.

---

<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:** [April 13, 2020, 1:57pm UTC](https://discuss.elastic.co/t/rest-api-in-elasticsearch-plugin/223761/3 "2020-04-13T13:57:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
