Search code examples
elasticsearchelasticsearch-6

Get a list of elasticsearch stored scripts in elasticsearch 6.4.2


I upgraded my ES from elastic 5.x to elasticsearch 6.4.2, and in this version I can't use scripts as a files but only as stored scripts.

I tried to receive all of the stored scripts with this command:

curl -XGET <elasticsearch_url>/_scripts

But it doesn't work.

There is a way I can get all of the stored scripts that saved in the ES?


Solution

  • You can retrieve all your stored scripts using the following command

    curl -XGET '<elasticsearch_url>/_cluster/state/metadata?filter_path=metadata.stored_scripts'