Get script languages Generally available

GET /_script_language

Get a list of available script types, languages, and contexts.

Required authorization

  • Cluster privileges: manage

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • language_contexts array[object] Required
      Hide language_contexts attributes Show language_contexts attributes object
      • contexts array[string] Required
      • language string

        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
        Any of:

        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 are painless, expression, mustache, or java.

        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
    • types_allowed array[string] Required
GET _script_language
resp = client.get_script_languages()
const response = await client.getScriptLanguages();
response = client.get_script_languages
$resp = $client->getScriptLanguages();
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_script_language"
client.getScriptLanguages();