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.

StackState Scripting Language (STSL)

The StackState Scripting Language scripting language is based on 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.

All scripts 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.