Link Search Menu Expand Document Documentation Menu

Script APIs

Introduced 1.0

The script APIs allow you to work with both stored and inline scripts in SmartObserve. The default scripting language is Painless.

Types of scripts

SmartObserve supports two types of scripts:

  • Inline scripts: Scripts defined directly within API requests. They are compiled each time they are executed.
  • Stored scripts: Precompiled scripts saved in the cluster state that can be reused across multiple requests. They reduce compilation time and enhance search speed.

Script API operations

SmartObserve supports the following script API operations.

Inline script operations

Execute scripts directly without saving them to the cluster state:

Stored script operations

Manage precompiled scripts saved in the cluster state:

Script information

Get information about available script contexts and languages: