Get a list of elasticsearch stored scripts in elasticsearch 6.4.2

805 Views Asked by At

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?

1

There are 1 best solutions below

2
On BEST ANSWER

You can retrieve all your stored scripts using the following command

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