# Attach handlers for dynamic URIs in REST plugins

**URL:** <https://discuss.elastic.co/t/attach-handlers-for-dynamic-uris-in-rest-plugins/15543>\
**Category:** Elasticsearch\
**Created:** [February 1, 2014, 3:24pm UTC](https://discuss.elastic.co/t/attach-handlers-for-dynamic-uris-in-rest-plugins/15543 "2014-02-01T15:24:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thierry\_Templier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thierry_templier/32/1745_2.png) [@Thierry\_Templier](https://discuss.elastic.co/u/Thierry_Templier)\
**Post date:** [February 1, 2014, 3:24pm UTC](https://discuss.elastic.co/t/attach-handlers-for-dynamic-uris-in-rest-plugins/15543/1 "2014-02-01T15:24:17Z")

</div>

Hello,

I implement a REST plugin for ElasticSearch that provides a set of URI  
to manage and search indices. I attached the supported URIs using the  
RestController and this works fine.

I have however the issue of dynamic URIs depending on the structure of  
types but I can't find a way to configure them. For example, for a type  
that has a field named field1, I would like to support URI like  
"(...)/mytype/id/field1" and "(...)/mytype/id/field1/fieldA" with a  
pattern like "(...)/{type}/{id}/\*". As a matter of fact, I can't know  
the depth of URI elements after "(...)/{type}/{id}/" by advance since it  
depends on the structure of type.

In fact I would need to attach handlers for URIs that starts with a  
specific pattern. Is it something supported?

Thanks for your help.  
Thierry

--  
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/52ED11A1.7080208%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/52ED11A1.7080208%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:53am UTC](https://discuss.elastic.co/t/attach-handlers-for-dynamic-uris-in-rest-plugins/15543/2 "2017-07-06T01:53:28Z")

</div>

Closed on July 6, 2017, 1:53am UTC


