Namespace: API-Script

API-Script

Methods

(static) deleteScriptApi(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}

Delete a stored script.
Parameters:
Name Type Attributes Description
params Object
Properties
Name Type Attributes Default Description
id string Stored script or search template name
timeout string <optional>
30s Explicit operation timeout
cluster_manager_timeout string <optional>
Specify timeout for connection to cluster_manager
options Object <optional>
Options for Transport#request
callback function <optional>
Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) getScriptApi(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}

Retrieves a stored script.
See also: OpenSearch - Get Stored Script
Parameters:
Name Type Attributes Description
params Object
Properties
Name Type Attributes Description
id string Stored script or search template name
cluster_manager_timeout string <optional>
Specify timeout for connection to cluster_manager
options Object <optional>
Options for Transport#request
callback function <optional>
Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) getScriptContextApi(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}

Retrieves all contexts for stored scripts.
See also: OpenSearch - Get stored script contexts
Parameters:
Name Type Attributes Description
params Object (Unused)
options Object <optional>
Options for Transport#request
callback function <optional>
Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) getScriptLanguagesApi(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}

The get script language API operation retrieves all supported script languages and their contexts.
See also: OpenSearch - Get script language
Parameters:
Name Type Attributes Description
params Object (Unused)
options Object <optional>
Options for Transport#request
callback function <optional>
Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) putScriptApi(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}

Creates or updates a script.
See also: OpenSearch - Create or update stored script
Parameters:
Name Type Attributes Description
params Object
Properties
Name Type Attributes Default Description
id string Stored script or search template name
body string The script
context string <optional>
Context in which the script or search template is to run. To prevent errors, the API immediately compiles the script or template in this context.
timeout string <optional>
30s Explicit operation timeout
cluster_manager_timeout string <optional>
Specify timeout for connection to cluster_manager
options Object <optional>
Options for Transport#request
callback function <optional>
Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) scriptsPainlessExecuteApi(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}

Execute Painless script
See also: OpenSearch - Execute Painless script
Parameters:
Name Type Attributes Description
params Object
Properties
Name Type Description
body string The painless script
options Object <optional>
Options for Transport#request
callback function <optional>
Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *