# How to get list of preregistered search template by REST api

**URL:** <https://discuss.elastic.co/t/how-to-get-list-of-preregistered-search-template-by-rest-api/96176>\
**Category:** Elasticsearch\
**Created:** [August 8, 2017, 4:07am UTC](https://discuss.elastic.co/t/how-to-get-list-of-preregistered-search-template-by-rest-api/96176 "2017-08-08T04:07:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sai\_Zin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_zin/32/19819_2.png) [@Sai\_Zin](https://discuss.elastic.co/u/Sai_Zin)\
**Post date:** [August 8, 2017, 4:07am UTC](https://discuss.elastic.co/t/how-to-get-list-of-preregistered-search-template-by-rest-api/96176/1 "2017-08-08T04:07:34Z")

</div>

I registered these search template to Elasticsearch with this query.

```
POST _search/template/myTemplate
{
    "template": {
        "query": {
            "match": {
                "title": "{{query_string}}"
            }
        }
    }
}

```

and

```
POST /_search/template/tweets
{
    "template": {
        "query": {
            "bool": {
                "filter": {
                    "term": {
                        "message": "{{ search_term }}"
                    }
                }
            }
        }
    }
}

```

The point I would like to know is can we get the list of search template and where that search has been stored ?  
Also can we modify those search template or not ?  
Please could someone help me ?  
Thank you.

---

<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:** [September 5, 2017, 4:07am UTC](https://discuss.elastic.co/t/how-to-get-list-of-preregistered-search-template-by-rest-api/96176/2 "2017-09-05T04:07:35Z")

</div>

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