# Call custom rest endpoint from java

**URL:** <https://discuss.elastic.co/t/call-custom-rest-endpoint-from-java/17835>\
**Category:** Elasticsearch\
**Created:** [May 30, 2014, 12:18pm UTC](https://discuss.elastic.co/t/call-custom-rest-endpoint-from-java/17835 "2014-05-30T12:18:45Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [May 30, 2014, 12:18pm UTC](https://discuss.elastic.co/t/call-custom-rest-endpoint-from-java/17835/1 "2014-05-30T12:18:45Z")

</div>

Hello,

I am currently writing a custom plugin for elasticsearch which exposes a rest enpoint. This endpoint can be called with curl like this :  
curl -XGET '[http://localhost:9200/lt-dev\_terminology\_v1/english/\_terminology?segment=seventy&analyzer=en\_analyzer](http://localhost:9200/lt-dev_terminology_v1/english/_terminology?segment=seventy&analyzer=en_analyzer)'

My question is how can I call the same thing from java and map the response to an object ?

Thanks,  
Ale

---

<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/call-custom-rest-endpoint-from-java/17835/2 "2017-07-06T01:25:49Z")

</div>


