# \_script index

**URL:** <https://discuss.elastic.co/t/script-index/117050>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [January 25, 2018, 1:27pm UTC](https://discuss.elastic.co/t/script-index/117050 "2018-01-25T13:27:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Stevens](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Steve\_Stevens](https://discuss.elastic.co/u/Steve_Stevens)\
**Post date:** [January 25, 2018, 1:27pm UTC](https://discuss.elastic.co/t/script-index/117050/1 "2018-01-25T13:27:38Z")

</div>

I can POST to /\_scripts/{name} and I can GET /\_scripts/{name}, but I can't seem to find an API to listing all stored scripts, or searching for them.  
Is there one?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 25, 2018, 2:00pm UTC](https://discuss.elastic.co/t/script-index/117050/2 "2018-01-25T14:00:20Z")

</div>

Hey,

this question might be better in the Elasticsearch forum, as it is not x-pack dependent.

Stored scripts are stored in the cluster state, and can thus be retrieved by accessing the cluster state. As they are not stored in an index they are not searchable either.

[https://www.elastic.co/guide/en/elasticsearch/reference/6.1/modules-scripting-using.html#modules-scripting-stored-scripts](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/modules-scripting-using.html#modules-scripting-stored-scripts)  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.1/cluster-state.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/cluster-state.html)

--Alex

---

<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:** [February 22, 2018, 2:00pm UTC](https://discuss.elastic.co/t/script-index/117050/3 "2018-02-22T14:00:27Z")

</div>

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