_script index

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?

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/cluster-state.html

--Alex

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