# REST interface for logstash input plugin

**URL:** <https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915>\
**Category:** Logstash\
**Created:** [February 3, 2017, 9:45pm UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915 "2017-02-03T21:45:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkelkar](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@mkelkar](https://discuss.elastic.co/u/mkelkar)\
**Post date:** [February 3, 2017, 9:45pm UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915/1 "2017-02-03T21:45:44Z")

</div>

Hi All,  
I am trying to create a REST interface for my logstash input plugin to interact with it. I want to expose some REST endpoints so that I can index documents in logstash through my input plugin. I am using Logstash 5.1.2. Any ideas on how to do this?

Thanks,  
Madhav.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 6, 2017, 11:12am UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915/2 "2017-02-06T11:12:36Z")

</div>

I don't think there are any particular restrictions on what Logstash plugins can do in this regard so any Ruby code for creating REST APIs should work fine here too.

You know that Logstash already has the http input plugin, right?

---

<div class="post-metadata">

**Author:** ![mkelkar](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@mkelkar](https://discuss.elastic.co/u/mkelkar)\
**Post date:** [February 7, 2017, 11:22pm UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915/3 "2017-02-07T23:22:55Z")

</div>

@magnusbaeck thank you for your input.

Yes, I am aware of http input plugin. My use-case is slightly different from http-input plugin though, which is why I am trying to build a REST interface.

Thanks,  
Madhav.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 8, 2017, 6:38am UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915/4 "2017-02-08T06:38:30Z")

</div>

Okay. And what specific problems are you having? Given the existence of the http input plugin and the widespread availability of Ruby REST code it's not clear what you want help with.

---

<div class="post-metadata">

**Author:** ![mkelkar](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@mkelkar](https://discuss.elastic.co/u/mkelkar)\
**Post date:** [February 8, 2017, 4:03pm UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915/5 "2017-02-08T16:03:05Z")

</div>

I should have phrased my question better in the first post, sorry about that!

I was essentially looking for two things -

1. are there any restrictions to use Ruby REST in the plugin, and
2. examples for REST API inside the plugin if there were any

Your reply provides answers to #1, and I am now looking for plugin examples which have REST based interface implemented.

Thanks,  
Madhav.

---

<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:** [March 8, 2017, 4:03pm UTC](https://discuss.elastic.co/t/rest-interface-for-logstash-input-plugin/73915/6 "2017-03-08T16:03:04Z")

</div>

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