Please note that following documentation is relevant to StackState version 1.14.9 and later.


StackState supports scripting and exposes several script APIs that allow power users to access, process, and analyze data.


The scripting language used by StackState is Groovy. The choice of Groovy is motivated by the fact that StackState is written in Scala and runs on the JVM. Currently Groovy is the best, most performant, script language for the JVM. You are not stuck to using Groovy though, but can use the Http script API to write your logic in any language.

Script executions are sandboxed to guarantee secure execution. All commands have a default (configurable) timeout of 15 seconds.

Running Scripts

StackState scripting can be used through the Analytics Environment that can be accessed from the main menu. The Analytics Environment interface consists of two components: the scripting panel on the left [1. see the screenshot below] and the results panel [2.] on the right. The user writes a script in the scripting panel and commands SackState to execute it using the “Execute Button” and receives the results of the execution in the results panel. The results can be viewed as a raw JSON string or in the form of preview generated by StackState automatically depending on the JSON objects type and content.


Script APIs:

All functionality that can be used through scripting is exposed via so-called script API’s. These are singleton objects that contain a number of functions that can be called. Below follows a list of script API’s: