StackState Template Json (STJ)
All configuration of StackState is described using StackState Templated Json.
This page describes StackState version 4.1.
The StackState 4.1 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.1 version range to upgrade to a more recent release.
Templates are used to convert raw synchronization data to components. Templates are defined in JSON extended with support for parameters, loops and conditions.

Handlebars syntax

StackState template files are using handlebars - a content that is placed between double curly brackets {{ some content }}. Below example shows a few handlebars used by a component template:
1
[{
2
"_type": "Component",
3
"checks": [],
4
"streams": [],
5
"labels": [],
6
"name": "{{ name }}",
7
"description": "{{ description }}",
8
"type" : {{ componentTypeId }},
9
"layer": {{ layerId }},
10
"domain": {{ domainId }},
11
"environments": [{{ environmentId }}]
12
}]
Copied!
StackState extends on that concept and allows to include different types of content within handlebars inside .stj files:
  • you can include a script (Groovy): {{ include "path/to/script.groovy" }}
  • you can include an icon: {{ include "path/to/icon.png" "base64" }}
  • you can include a template: {{ include "path/to/template.handlebars" }}

Component and Relation templates

Please find more information on the Component and Relation templates page.
Last modified 5mo ago