Create or update a script or search template
Creates or updates a stored script or search template.
More about searching templatesRequired authorization
- Cluster privileges manage
Query parameters
Request body
-
scriptobjectrequired -
The script or search template, its parameters, and its language.
-
langunionrequired -
The language the script is written in. For search templates, use
mustache.Supported values include:
painless: Painless scripting language, purpose-built for Elasticsearch.expression: Lucene’s expressions language, compiles a JavaScript expression to bytecode.mustache: Mustache templated, used for templates.java: Expert Java API
-
Values:
painlessexpressionmustachejava