# Write data to Elasticsearch through plugin

**URL:** <https://discuss.elastic.co/t/write-data-to-elasticsearch-through-plugin/339260>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [July 26, 2023, 6:55am UTC](https://discuss.elastic.co/t/write-data-to-elasticsearch-through-plugin/339260 "2023-07-26T06:55:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheereen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheereen/32/122005_2.png) [@Sheereen](https://discuss.elastic.co/u/Sheereen)\
**Post date:** [July 26, 2023, 6:55am UTC](https://discuss.elastic.co/t/write-data-to-elasticsearch-through-plugin/339260/1 "2023-07-26T06:55:28Z")

</div>

Hi,

I am creating an **external plugin in Kibana 8.8.1 using React.**

I want to **write data to an Elasticsearch index** on a button click inside the plugin.

I presume I will have to use the **Elasticsearch service** provided by the core API. Or is there any other alternative?

How can I use the Elasticsearch service? There is not much documentation regarding the same except for this ([Elasticsearch service | Kibana Guide [8.9] | Elastic](https://www.elastic.co/guide/en/kibana/current/elasticsearch-service.html)), which doesn't explain how to use it.

Thanks

---

<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:** [August 23, 2023, 6:56am UTC](https://discuss.elastic.co/t/write-data-to-elasticsearch-through-plugin/339260/2 "2023-08-23T06:56:04Z")

</div>

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