Template Engine
The EdgeIQ Template Engine allows users to reference dynamic data from within our system or from an incoming report. It's especially useful to customize the data sent to external systems from a policy action.
Syntax
Anything enclosed in double brackets {{ }}
will be interpreted by the template engine. Inside the brackets, you must start with either a keyword or a dot notated reference to any available context data.
Context Data
Context data should be referenced using dot notation and the value referenced should be a string
or number
unless using the json_object
prefix.
Report
.Report.Payload.your_payload_field
Device
.Device.Name
.Device.UniqueID
.Device.Metadata.your_metadata_field
DeviceType
.DeviceType.Name
.DeviceType.Manufacturer
.DeviceType.Model
.DeviceType.Type
.DeviceType.LongDescription
.Device.Metadata.your_metadata_field
Keywords
Keyword | Description | Example |
---|---|---|
json_object | Marshals the referenced object into a JSON string | {{ json_object .Report.Payload }} |
secret | Parses a reference to a Secret object (see Secrets below) | {{ secret "5a2a4fe8-4e4f-45c8-bbe7-b3c721d586aa" }} |
Secrets
EdgeIQ Secrets allow users to securely store sensitive data for integrations with external systems or for reference in policy actions. Once created in our system, a secret can be referenced with template syntax using the secret
keyword followed by the secret ID as follows:
{{ secret "5a2a4fe8-4e4f-45c8-bbe7-b3c721d586aa" }}
When parsed, the above template will be replaced with the content
string stored in the secret.
Updated about 2 years ago