# Ruby API: difference between indices.template.\* and indices.index\_template

**URL:** <https://discuss.elastic.co/t/ruby-api-difference-between-indices-template-and-indices-index-template/238558>\
**Category:** Elasticsearch\
**Created:** [June 24, 2020, 8:20pm UTC](https://discuss.elastic.co/t/ruby-api-difference-between-indices-template-and-indices-index-template/238558 "2020-06-24T20:20:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russell\_Fulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/russell_fulton/32/62888_2.png) [@Russell\_Fulton](https://discuss.elastic.co/u/Russell_Fulton)\
**Post date:** [June 24, 2020, 8:20pm UTC](https://discuss.elastic.co/t/ruby-api-difference-between-indices-template-and-indices-index-template/238558/1 "2020-06-24T20:20:09Z")

</div>

I have been writing some code to manage indexing templates and became very confused over whether I should be using , say, `indices.exists_index_template.rb` or `indices.exists_template.rb`. After a lot of trial and error I found that I had to use exists\_template.rb. Same goes for all other functions.

Examining the code suggest that it should be the other way around.

So what is the \*\_index\_template.rb family for?

I note that all the REST API calls use \_index\_template.

---

<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 22, 2020, 8:20pm UTC](https://discuss.elastic.co/t/ruby-api-difference-between-indices-template-and-indices-index-template/238558/2 "2020-07-22T20:20:19Z")

</div>

Closed on July 22, 2020, 8:20pm UTC

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